Comparison Operators in python
Comparison operators compare two values and return either True or False.
| Operator | Description |
| == | Equal to |
| != | Not equal to |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
Example
a = 10
b = 20
print(a == b)
print(a != b)
print(a > b)
print(a < b)
Output:
False
True
False
True