#### Relational Operator in Python

 Symbol Description Example 1 Example 2 < Less than >>>7<10True>>> 7<5False>>> 7<10<15True>>>7<10 and 10<15True >>>"Hello"< "Goodbye"False>>>'Goodbye'< 'Hello'True > Greater than >>>7>5True>>>10<10False >>>„Hello‟> „Goodbye‟True>>>'Goodbye'> 'Hello'False <= less than equal to >>> 2<=5True>>> 7<=4False >>>"Hello"<= "Goodbye"False>>>'Goodbye' <= 'Hello'True >= greater than equal to >>>10>=10True>>>10>=12False >>>"Hello">= "Goodbye"True>>>'Goodbye' >= 'Hello'False ! =, <> not equal to >>>10!=11True>>>10!=10False >>>‟Hello‟!= "HELLO"True>>> "Hello‟ != "Hello‟False == equal to >>>10==10True>>>10==11False >>>"Hello" == "Hello"True>>>"Hello" == "Good Bye"False

Example: To test Relational Operators:

```#Demo Program to test Relational Operators
a=int (input("Enter a Value for A:"))
b=int (input("Enter a Value for B:"))
print ("A = ",a," and B = ",b)
print ("The a==b = ",a==b)
print ("The a > b = ",a>b)
print ("The a < b = ",a<b)
print ("The a >= b = ",a>=b)
print ("The a <= b = ",a<=0)
print ("The a != b = ",a!=b)
#Program End```

Output:

Enter a Value for A:35

Enter a Value for B:56

A = 35 and B = 56

The a==b = False

The a > b = False

The a < b = True

The a >= b = False

The a <= b = False

The a != b = True