3.2. Booleans - JulTob/Python GitHub Wiki

🐍 Booleans

true_boolean = True
false_boolean = False

🦎🐊 Booleans comparators

Concatenation solved left to right, shortcuting

<     Less than
>     More than
<=    Less or equal to
!=    not equal to
==    equal to

x == y
x < y
x > y
x != y
x >= y
x <= y

x is y # Point to the same object
x is not y 

x in cont_obj
x not in cont_obj

# In order of preference
not b1
b1 and b2
b1 or b2

🐉 Casting

0 == False  # Other ints are true