2445
133
12454
123
3
5
25
1
9
15
Error
list1.shuffle()
shuffle(list1)
random.shuffle(list1)
random.shuffleList(list1)
print(list1[0])
print(list1[:2])
print(list1[:-2])
all of the mentioned
None
2
What is the output of the following code?
list1=[2, 33, 222, 14, 25] print(list1[ : -1 ])
[2, 33, 222, 14]
[25, 14, 222, 33, 2]
What will be the output of the following Python code?
names = ['Amir', 'Bear', 'Charlton', 'Daman'] print(names[-1][-1])
A
Daman
n
[2, 6, 4]
[1, 3, 2, 1, 3]
[1, 3, 2, 1, 3, 2]
[1, 3, 2, 3, 2, 1]
[0, 1, 2, 3]
[0, 1, 2, 3, 4]
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5, 2.0]
list1 = [11, 2, 23] list2 = [11, 2, 2] print(list1 < list2)
True
False
list1.add(5)
list1.append(5)
list1.addLast(5)
list1.addEnd(5)
list1.insert(3, 5)
list1.insert(2, 5)
list1.add(3, 5)
list1.append(3, 5)
list1.remove(“hello”)
list1.remove(hello)
list1.removeAll(“hello”)
list1.removeOne(“hello”)
0
4
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[25, 20, 5, 5, 4, 3, 3, 1]
[3, 1, 25, 5, 20, 5, 4, 3]
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
[3, 4, 5, 20, 5, 25, 1]