Learn String Manipulation by Building a Cipher - Step 19

Tell us what’s happening:

I noticed that this shows one number before the actual number od position of letter of alphabet. Why is that?
For example if I am about to check for position for letter H in text variable - output gives me ‘7’ instead of ‘8’

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[9].lower())
print(index)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 19

strings are 0-index, the first character is at index 0, so the 8th character is at index 7

okay, got it= thank you!