Zum Inhalt

Boolescher Typ

Richtig und falsch (beachten Sie die Großbuchstaben T und F)

is_raining = True
is_sunny = False

print(bool(1))            # Output: True
print(bool(0))            # Output: False
print(type(is_raining))   # Output: <class 'bool'>