If you have an if statement where several variables or functions are evaluated, in which order are they evaluated?
if foo > 5 or bar > 6: print \'f
Python's or operator short-circuits and it will be evaluated left to right:
or
if (foo > 5) or (bar > 6): print 'foobar'
If foo > 5, then bar > 6 will not even be tested, as True or will be True. If foo isn't > 5, then bar > 6 will be tested.
foo > 5
bar > 6
True or
True
foo
> 5