Strings and console output - Access by index


#1

On line 13, assign the variable fifth_letter equal to the fifth letter of the string "MONTY".

Remember that the fifth letter is not at index 5. Start counting your indices from zero.

What are we supposed to answer in the online python emulator?
var = "MONTY"
fifth_letter = var[4]
print fifth_letter

why is this giving error?


#2

Maybe just

fifth_letter = "MONTY"[4]

if not,
please mention the exact Error/Oops-message you are getting.


#3

Don't worry. The answer is

fifth_letter = "MONTY"[4]

or maybe it doesn't have quotes. I don't remember.