IF STATEMENTS
Skip Montanaro
skip at pobox.com
Wed Oct 17 18:44:42 EDT 2001
>> if (vars1==1 and vars2==2) :
>> ...
Markus> Ough, you should do away with this ugly parents!
They are helpful if you have an expression with several clauses:
if (a == 1 and
b == 2 and
c == 3 and
...
x == 24 and
y == 25 and
z == 26):
pass
They allow you to dispense with the otherwise mandatory trailing
backslashes:
if a == 1 and \
b == 2 and \
c == 3 and \
...
x == 24 and \
y == 25 and \
z == 26:
pass
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list