Python Bool() Function with example
In Python Bool() Function return true for positive and negative values. It returns false for zero or none values.
x = bool(1) print(x) x = bool(10) print(x) x = bool(100) print(x) x = bool(-1) print(x) x = bool(0) print(x) x= None print(bool(x))
Output:
True
True
True
True
False
False