"Sudarshana Banerjee" <sudarshan...@gmail.com> wrote
Could you take a look at this please:
x=3
if x==0:
print "x is 0"
elif x&1==1:
SyntaxError: invalid syntax
See, the moment I am pressing Enter the >>> is coming.. not ...
IDLE doesn't give you a ... prompt it gives you spaces.
So you mistake is that ypu are hitting Enter after your print line.
It needs to look like:
x=3
if x==0:
print "x is 0"
elif x&1==1:
print....
Which looks horrible and I wish Idle were fixed so it didn't do this.
I keep meaning to try and find a way to patch it myself!
Essentially you need to ignore the >>> offset in the if line.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor