Home »
Python »
Python List MCQs
How to access the last element of the list?
14. How to access the last element of the list?
- Print L1[last index]
- Print L1 [-1]
- Print L1 [-LAST INDEX]
Answer: B) Print L1 [-1]
Explanation:
To access the last element directly of the list we can use the following syntax: List name[-1].