x and y first evaluates x. If x is false, the result is x ; otherwise, the result is y.
x or y first evaluates x. If x is true, the result is x ; otherwise, the result is y .
and and or don't force their results to be True or False, but rather return one or the other of their operands.
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Wednesday, September 29, 2010
Subscribe to:
Posts (Atom)