| Python Library Reference |
Any object can be tested for truth value, for use in anif orwhile condition or as operand of the Boolean operations below.The following values are considered false:
None False 0,0L,0.0,0j.'',(),[].{}.False.2.5All other values are considered true -- so objects of many types arealways true.
Operations and built-in functions that have a Boolean result alwaysreturn0 for false and1 for true, unless otherwisestated. (Important exception: the Boolean operations"or" and "and" always return one oftheir operands.)
| Python Library Reference |