The first element of a list is at index:
-
A
0
Correct answer
-
B
1
-
C
−1
-
D
n
12 views
Explanation
Python uses zero-based indexing. So the first element is at index 0. The last element of a list of length n is at index n−1.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ