मान लीजिए L [2, 3, 8, 4, 5] है, L[-1] क्या है?
Suppose L is [2, 3, 8, 4, 5], What is L[-1]?
A)
B)
C)
D)
Explanation:
In Python, negative indexing means counting from the end of the list. So, L[-1]
refers to the last element of the list.
For the list L = [2, 3, 8, 4, 5]
, the last element is 5
.
Answer: (B) 5