Learn String Manipulation by Building a Cipher - Step 6

Tell us what’s happening:

Step 6
You can also access string characters starting from the end of the string. The last character has an index of -1, the second to last -2 and so on.

Now modify your existing print() call to print the last character in your string.

Your code so far


# User Editable Region

text = 'Hello World'
print(text[10])

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 6

you need to use negative index as explained