float
bool
list
Converts a value to a Boolean.
bool(x?)
Enter values below to update the example in real time.
print
print(bool(0)) # False print(bool(1)) # True print(bool("")) # False print(bool("hi")) # True