Conditionalselif statementif a == '+': op = PLUS elif a == '-': op = MINUS elif a == '*': op = MULTIPLY else: op = UNKNOWN Boolean expressions: and, or, notif b >= a and b <= c: print "b is between a and c" if not (b < a or b > c): print "b is still between a and c" |
<<< | O'Reilly OSCON 2000, Advanced Python Programming, Slide 9 July 17, 2000, beazley@cs.uchicago.edu |
>>> |