my_bool = True
print(type(my_bool)) # <class 'bool'>
# the 'True' is also 1, so adding it with 4 gives 5
print(True + 4) # 5
# and 'False' is 0, so adding it with 4 stays 4
print(False + 4) # 4
# Using boolean in if..else conditions, executes only when boolean is True
if my_bool:
print('printed') # printed
if False:
print('never executed')
# number to bool: anything not 0 is True
print(bool(-40), bool(0), bool(40)) # True False True
# str to bool: empty string is False, rest is True
print(bool(""), bool("This is string")) # False True