Learn String Manipulation by Building a Cipher - Step 6

Tell us what’s happening:

Needs help with it because I can’t figure it out right now
I can’t figure it out

Your code so far


# User Editable Region

text = 'Hello World'
print(text[6])
print(string[-6])

# 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/126.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 6

The last character has an index of -1

-1, because the first character is 0, you go backwards and loop around to the end with -1, -2 would be the second last character.

Your string is called text, the variable string does not exist.

Now modify your existing print() call

Modify this line, do not add an additional line:

print(text[6])