where do I need to "tab"?
narutocanada at gmail.com
narutocanada at gmail.com
Fri Oct 19 22:00:11 EDT 2007
hi
I'm following the python's translation of SICP:
http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Python:Chapter_1
...
a = 3
b = a + 1
print a + b + (a * b)
print (a == b)
print b if ((b > a) and (b < (a * b))) else a
everything was fine till this point, and I got:
print b if ((b > a) and (b < (a * b))) else a
^
SyntaxError: invalid syntax
Is there a good rule that I quickly memorize as to "when to tab"?
Thanks.
More information about the Python-list
mailing list