मान लीजिए L [2, 3, 8, 4, 5] है, L[-1] क्या है?
Suppose L is [2, 3, 8, 4, 5], What is L[-1]?
A
2
B
5
C
8
D
4
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
Correct Answer: B) 5