Question
What does the index `-1` select from a nonempty Python sequence?
Select an option. Your answer will be checked instantly.
Correct Answer: B. The last element
Explanation:
Negative indexing counts backward from the end of a sequence. Index -1 therefore refers to the final element.
Leave a Reply