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