Access by Index


#1

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

print fifth_letter = "MONTY{4}"


#2

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:


#3

thank you it works!!!


#4

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