H13-311_V3.5 · Question #79
The Python list can be identified by `[]", and the default index of the first element from left to right is 1.
The correct answer is B. False. Option B is correct because the statement contains a critical error: while Python lists are indeed denoted by square brackets [], the first element's index is 0, not 1 - Python uses zero-based indexing. Option A (True) is wrong because it accepts the false claim that indexing…
Question
The Python list can be identified by `[]", and the default index of the first element from left to right is 1.
Options
- ATrue
- BFalse
How the community answered
(47 responses)- A17% (8)
- B83% (39)
Explanation
Option B is correct because the statement contains a critical error: while Python lists are indeed denoted by square brackets [], the first element's index is 0, not 1 - Python uses zero-based indexing. Option A (True) is wrong because it accepts the false claim that indexing starts at 1, which would only be true in languages like Lua or MATLAB, not Python. A helpful memory tip: think of the index as an offset from the start - the first element is 0 steps away from the beginning, the second is 1 step away, and so on. So my_list[0] gives you the first element, and my_list[1] gives you the second.
Topics
Community Discussion
No community discussion yet for this question.