Mega Code Archive
Categories
/
Python Tutorial
/
Buildin Function
Convert a value to a Boolean, using the standard truth testing procedure
print bool('this is a test') print bool(42) print bool('') print bool(0)