Access by Index


What is wrong with my code?
fifth_letter = "MONTY"

print fifth_letter = "MONTY{4}"


you wrote a varibale named fifth_letter and gave it a value MONTY

so you can just write

print fifth_letter[4]

you have to use [ ] brackets

feel free to ask questions :slight_smile:


thank you it works!!!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.