Question 1
Question
List is similar to Array in Python
Question 2
Question
List is represented by
Question 3
Question
List can only hold similar data types.
Question 4
Question
Which is/are the correct ways to initialize a List ?
Question 5
Question
List index starts from 0
Question 6
Question
What is the last index of a list ?
Question 7
Question
Which method is used to enter element at last in a list ?
Answer
-
append( )
-
add( )
-
last( )
-
end( )
Question 8
Question
List = [1, 2, 3, 4, 5]
List[-1] = ?
Question 9
Question
List = [1,2,3,4]
List[1:3] = ?
Answer
-
[1,2,3]
-
[1,2]
-
[2,3]
-
[2,3,4]
Question 10
Question
What is the output of [0] * 4 ?
Answer
-
[0, 0, 0, 0]
-
0000
-
0,0,0,0
-
[0][0][0][0]
Question 11
Question
List = [1,2,3,4]
List[-1:-2] = ?
Question 12
Question
List = [12,,12,14,16,18, 20]
List.count(12) + List.count(14) = ?
Question 13
Question
List = [1,2,3,4,5]
List.index(2) = ?
Question 14
Question
List = [0,1,2,3,4,5]
len(List) = ?
Question 15
Question
List = [20,30,40,50]
List.len()
Question 16
Question
List_A = [1,2,3,4,5]
List_B = [6,7,8,9,11]
max(List_A) + min(List_B) = ?
Question 17
Question
List_A = [1,2,3,4]
List_B = [5,6,7,8]
Which method is used to produce a new list, List_C = [1,2,3,4,5,6,7,8] , from List_A and List_B ?
Answer
-
append()
-
extend()
-
insert()
-
add()
Question 18
Question
List_A = [6,10,5,0,22]
Which method will produce an output , [22,0,5,10,6] ?
Answer
-
sort()
-
reverse()
-
backwards()
-
change()
Question 19
Question
pop() method is used to pop a List Element from the end.
Question 20
Question
How to remove the first element from a List ?
Answer
-
remove()
-
pop()
-
pop(0)
-
discard(0)
Question 21
Question
Which word is used to Reverse a list using sort() in descending order ?
Answer
-
reverse
-
descending
-
backwards
-
Can't Reverse a List
Question 22
Question
List_A = [1,2,3,4,5]
sum(List_A[2:]) = ________ ?