Relational and Boolean Operators
Relational Operators
greater_than = 7 > 4 # True (7 is greater than 4)
less_than = 8 < 10 # True (8 is less than 10)
greater_than_equal_to = 7 >= 7 # True (7 is equal to 7)
less_than_equal_to = 7 <= 7 # True (7 is equal to 7)
print(greater_than)
print(less_than)
print(greater_than_equal_to)
print(less_than_equal_to)
Boolean AND Operator (and)
and)
Boolean OR Operator (or)
or)
Not Operator (not)
not)
β
Summary:

Last updated