Relational Operators in Python

Python Script to use the less than operator (<) to compare the operand value



num1=6
num2=7
print("num1 < num2=",(num1 < num2))
print(" num2 < num1=",(num2 < num1))

Output:
num1 < num2= True
num2 < num1 =False

Program Explanation:
num1 and num2 is assigned integer values 6 and 7.
print function shows the message.
num1 < num2=True.
and simillarly for
num2 < num1
the output is num2 < num1 =False

Next Topic:-->> Logical Operators || Previous Topic:-->>Assignment Operators