Python Comparison Operator Example


Comparison Operator

It is used to compare the value of two operands and return the result in the form of the booleans - either True or False.

Program
x = 7 y = 3 print(x == y) #Equal print(x != y) #Not Equal print(x > y) #Greater Than print(x < y) #Less Than print(x >= y) #Greater Than Equal To print(x <= y) #Less Than Equal To
Input
Output