In python this is called short-circuiting. Logical expressions are evaluated left to right (taking into account brackets) and execution stops as soon as it is clear what the logical answer will be.
Try this code in the interactive console:
>>> def one():
... print "one called"
... return True
>>> def two():
... print "two called"
... return True
>>> one() or two()
The response will be:
one called
True
The same thing happens with and
(if the first argument is False, the 2nd argument is never evaluated).