Learn String Manipulation by Building a Cipher - Step 12

Tell us what’s happening:

I cant understand what does the text[0] means

Your code so far


/* User Editable Region */

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet.find('c')

/* 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/120.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 12

The number 0 refers to the letter H in the variable text.

text[0] == ‘H’
text[1] == ‘e’
text[2] == ‘l’

text[6] == ‘W’

If you are unsure about something it can help to print it to test it out.

print(text)
print(text[0])
print(text[1])

This would tell you a lot