Python boolean Values
The builtin boolean values are
>>> x = TRUE >>> if (x): "good"; ...
'good'
Function
bool()
can be used to test a boolean value:>>> bool(True)
True
>>> bool(False)
False
Other
>>> bool(True)
True
>>> bool(False)
False
>>> bool(None)
False
>>> bool(0)
False
>>> bool("")
False
>>> bool("good")
True
>>> bool([1,2])
True