[Tutor] Why does invalid syntax pop up?
alan.gauld at freenet.co.uk
Thu Jul 7 23:02:38 CEST 2005
> Why does invalid syntax popup?
If you show us the error message it will probably tell us.
Thats what the error messages are for. They may look cryptic when
you start out but they generally give you a clue as to roughly
the right bit of the program and the reason.
Can you repost with the error to save us reading and analysing
all of your code.
Now a quick scan through shows up some strangely indented print
statements, is it those that are being complained about:
print "Lookup a login info card"
there is an indentation mismatch between these lines.
site = raw_input("Site: ")
print "The ID is: ",sitelist[site]
print "The password is: ",sitelist[site]
print site," was not found."
Author of the Learn to Program web tutor
More information about the Tutor