pokemonfan
pokemonfan

Reputation: 207

Why do I have a syntax error on my print function?

I'm trying to learn to program and I've gotten stuck on this piece of code

if 0 <= option < len(names)
    print names[option]
elif option == 99:
    quit
else:
    print "That is not a valid option!"

When trying to run the program I get a syntax error on the first print command, and I've searched for it for like an hour or two now but I just don't see what's wrong? Please help me.

Upvotes: 0

Views: 295

Answers (1)

arshajii
arshajii

Reputation: 129572

if 0 <= option < len(names):
                           ↑

Upvotes: 5

Related Questions