Home »
Python »
Python List MCQs
How indices in Python list are denoted?
9. How indices in python list are denoted?
L1= [99,12,3,33,"ram", "hello",122]
- L1[index 0] =99;
- L1[index (0)] =99;
- L1 [1] =12;
- L1(1) =12;
Answer: C) L1 [1] =12;
Explanation:
The index of the python list is denoted by: - List name [index]. In the example given above L1 is the list name and 1 is the index so the correct syntax would be L1[1] which will give you 12 as a result as at index 1 we have a 12 as its value.