No student devices needed. Know more
7 questions
What will be the output of following program:
list1 = ["python", "list", 1952, 2323, 432]
print(list1[1:4])
["python","list",1952,2323]
[1952,2323,432]
["list",1952,2323]
["list",1952,2323,432]
What will be the output of following program:
list1 = ["python", "list", 1952, 2323, 432]
print(list1[-5])
list
1952
432
python
What will be the output of following code-
a,b=[3,1,2],[5,4,6]
print(a+b)
[3,1,2]+[5,4,6]
(3,1,2,5,4,6)
[3,1,2,5,4,6]
[54,6,3,1,2]
What will be the output of following code-
list1=[1, 3, 2]
list1 * 2
[1,3,2][1,3,2]
[1,3,2]*2
[1,3,2,1,3,2]
( [1,3,2] )([1,3,2])
theList=[1, 2, [1.1, 2.2]]
print(len(theList))
1
2
3
4
What will be the output of following program:
data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
print(data[1][0][0])
2
5
1
7
What will be the output of following program:
a=[2,3]
a.append(7)
print(a))
(2,3)
[2,7]
[2,3,7]
[7,2,3]
Explore all questions with a free account