What is the output of following code
x = "HELLO" print(x[1:-1])
ELL
ELLO
HELL
LL
d = {1:"A", 2:"B", 1:"C"} print(d)
{1:'A',2:'B'}
{1:'C',2:'B'}
Error
{1:'A',1:'C',2:'B'}
d = {} d[1] = "Python" d[2] = "Java" print(len(d))
0
1
2
a = [1,2,3] del a[1] print(a)
[1,2,3]
[1,3]
[2,3]
a = [5,2,3] print(a[5:])
[ ]
None
5
Local, Enclosing, Graphical, Built-in
Local, External, Global, Binary
List, Entry, Global, Block
Local, Enclosing, Global, Built-in
static
global
public
extern
A package manager
A loop structure
A file containing Python code
A variable type
Local variable gets priority
Global variable gets priority
Error occurs
Both are merged
create()
list()
tuple()
array()
size
dtype
ndim
shape
range()
space()
arange()
linspace()
print( 5 in 515)
True
False
TypeError
ValueError
a=[2,3,4,5] a.insert(3,1) print(a)
[3,2,3,4,5]
[2, 3, 4, 1, 5]
[2, 3,1, 4, 5]
[2, 3,3, 4, 5]
a=[1,2,3] a[::-1] print(a)
[3,2,1]
[2,1,3]
[3,1,2]
seek()
read()
close()
tell()
move()
shift()
w
rb
rt
r
Data is appended
Old content is erased
Nothing happens
random
sys
math
os