Comparison Operators
Operator
Meaning
Example
Example
x = 10
y = 12
print(x > y) # False
print(x < y) # True
print(x == y) # False
print(x != y) # True
print(x >= y) # False
print(x <= y) # TrueNotes
Last updated
x = 10
y = 12
print(x > y) # False
print(x < y) # True
print(x == y) # False
print(x != y) # True
print(x >= y) # False
print(x <= y) # TrueLast updated
print((1, 2, 3) > (1, 2)) # True
print((1, 2, 3) > (1, 5)) # False