Start learning →
Home › Olympiad (Class 11) › Computer Science › Python Strings Lists and Tuples › Counting from the right hand end of a Python str…

Counting from the right hand end of a Python string, the last character has index:

A-1
B-0
C-2
D-9
Answer & Solution
Correct answer: A. -1
1. Negative indexes count from the right. 2. They start at minus one, not minus zero. 3. So the last character is at -1. _Source: OpenStax Introduction to Python Programming, Chapter 3._
Practise this question with Quill — Olympiad (Class 11) →
Related questions