Python's Syntax
fabi.kreutz at gmx.de
fabi.kreutz at gmx.de
Fri Mar 1 12:26:59 EST 2002
Hi,
> if condition == TRUE:
> do this
> How do you tell it when to stop? I just can't figure out how to do it.
It's the identation that "closes the brackets".
Like this:
if condition:
do something
so something else
continue indepently from condition
programm cntinues
Just try to change the identation slightly, you will get an parser error,
if it does not fit:
if condition:
idented
wrong-idented
> Also, another thing about Python's syntax. Are statements just sperated by
> their lines, or do they have some form of seperator (like a semi-colon)?
Ah, this question is already aswered :)
Bye
More information about the Python-list
mailing list