Booleans (bool)
Booleans (bool
)#
The boolean data type (or bools) hold one of two values: True
or False
.
bool_var1 = True
print('Var 1', bool_var1, type(bool_var1))
bool_var2 = False
print('Var 2', bool_var2, type(bool_var2))
Var 1 True <class 'bool'>
Var 2 False <class 'bool'>