Start learning →
Home › Olympiad (Class 11) › Computer Science › Python Strings Lists and Tuples › In the Python string 'HELLO', the index of the l…

In the Python string 'HELLO', the index of the letter H is:

A5
B0
C1
D2
Answer & Solution
Correct answer: B. 0
1. Indexes run left to right from a fixed start. 2. Python starts counting at zero. 3. So the index of H is 0. _Source: OpenStax Introduction to Python Programming, Chapter 3._
Practise this question with Quill — Olympiad (Class 11) →
Related questions