True ... and False , obviously.
Otherwise, None evaluates to False, as does the integer 0 , as well as float 0.0 (although I would not use similar floats). In addition, empty lists [] , empty tuplets () and empty lines '' or "" are evaluated as False.
Try it yourself with the bool() function:
bool([]) bool(['a value']) bool('') bool('A string') bool(True) # ;-) bool(False) bool(0) bool(None) bool(0.0) bool(1)
etc..
Terje Dahl Nov 17 '09 at 13:02 2009-11-17 13:02
source share