List
Dictionary
Set
None of the Above
arr[-2]
arr[2]
arr[-1]
arr[1]
What will be the output of the following ?
print((range(4)))
0,1,2,3
[0,1,2,3]
range(0, 4)
(0,1,2,3)
list=()
list.null
null.list
list=[]
What does the following code print ?
x = 'mohan' for i in range (len(x)): x[i].upper() print (x)
mohan
MOHAN
Error
None of These
set
tuple
string
What is the output of the following code ?
ms = ('A','D', 'H','U','N','I','C') print(ms[1:4])
(‘D’, ‘H’, ‘U’)
(‘A’, ‘D’, ‘H’,’U’,’N’,’I’,’C’)
(‘D’,’H’,’U’,’N’,’I’,’C’)
What is the output of the following statement ?
print ((2, 4) + (1, 5))
(2 , 4), (4 , 5)
(3 , 9)
(2, 4, 1, 5)
Invalid Syntax
What is the output of the following code?
a = {1:"A", 2: "B", 3: "C"} b = {4: "D", 5: "E"} a.update(b) print(a)
{1:’A’, 2: ‘B’,3: ‘C’}
{1: ‘A’, 2: ‘b’, 3: ‘c’, 4: ‘D’, 5: ‘E’}
{4: ‘D’, 5: ‘E’}
23
'2+3'
'23'
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
What will be the output of the following expression?
a = 2 b = 8 print(a|b ) print(a >> 1)
10 0
10 2
2 2
10 1
what is the output of the following code?
M=['b' *x for x in range(4)] print(M)
['', 'b', 'bb', 'bbb']
['b,'bb', "bbb', "bbbb']
['b','bb', bbb']
none of these
What is the output of the following?
print(max([1, 2, 3, 4.] [4, 5, 6], [7]))
[4,5, 6
[7]
[1, 2,3, 4]
7
What will be the output of the following?
print(sum(1,2,3))
error
6
1
3
What will be the output of the following Python code?
list1=[1,3] list2=list1 list1[0]=4 print(list2)
[1, 4]
[1,3, 4]
[4,3]
[1,3]
anywhere in between the file
End
beginning
second line of the file
What will be the output of the following code snippet?
d={3,4,5} for k in d: print(k)
{3, 4, 5},{3, 4, 5}, {3, 4, 5}
3 4 5
syntax error
None of the above
What will be the output of following statement ?
>>>"m"+"n1"
'm+nl'
'mn1'
'm n1'
'm'
list
dict