Comparison Operations

There are eight comparison operations in Python

a = 3
b = 2

print(a == b)       # False
print(a != b)       # True
print(a < b)        # False
print(a > b)        # True
print(a <= b)       # False
print(a >= b)       # True
print(a is b)       # False
print(a is not b)   # True

results matching ""

    No results matching ""