Need help with programming.
Matthew Dixon Cowles
matt at mondoinfo.com
Wed Oct 24 21:08:45 EDT 2001
On 24 Oct 2001 23:46:36 GMT, Django <heeroygw at aol.comnojunk> wrote:
>Hello. I've just begun using Python, and am now getting into simple
>commands. Everytime I try to use "else:" I get this message:
>SyntaxError: invalid syntax
It's probably your indentation. The else: needs to be lined up with
your if:
>>> a=5
>>> if a==4:
... print "four"
... else:
... print "not four"
...
not four
Regards,
Matt
More information about the Python-list
mailing list