2. < Less Than Operator.:
The operator checks the value of the left operand is less than the right operand, and if the statement is true, the operator is said to be the less Than Operator.
The < Operator Returns true if the left operand(variable) is less than to the right operand(variable), Otherwise returns flase
e.g.
a=15
b=13
a<b
In the example given above the value of variable a is greater than the value of variable b hence the expression returns false
Relational Operator in Python
In this topic section, we will discuss the Relational operators in the Python Scripting language. Relational Operators are the special symbols used to create Relationship and Compares the value of two variables or operands in the Python Scripting.
Python Scripting ( programming) has number of Relational operators.These operators are generally used in the comparison between two values or conditions. These comparison condition drives us to the Boolean expression values by which the codeython written is accordingly executed.
Following are the List of Relational Operator in Python.
1. > Greater Than Operator.
2. < Less Than Operator.
3. >= Greater Than Equal to Operator.
4. <= Less Than Equal to Operator.
5. != Not Equal to Operator.
6. == Equal to Operator.
Let us learn The Relational Operators:
The Relational Operators are special Type of Operators used in Python to define some kind of relations between two operand or variables.
Relational Operators compares string,logical,numeric or character data.
The Result of the Comparision either true or false and can be used to make decisions Regarding Program flow.
Let discuss them one by one.
1. > Greater Than Operator.:
The operator checks the value of the left operand is greater than the right operand, and if the statement is true, the operator is said to be the Greater Than Operator.
The > Operator Returns true if the left operand(variable) is greater than to the right operand(variable), Otherwise returns flase
e.g.
a=5
b=3
a>b
In the example given above the value of variable a is greater than the value of variable b hence the expression returns true
Python script to use the greater than operator (>) to compare the operand values
num1=int(input(" Enter the value of num1: "))
num2=int(input(" Enter the value of num2: "))
# use of greater than operator (>)
print("\n num1>num2=",(num1>num2))
print("\n num2>num1=",(num2>num1))
Output:
Enter the value for num1: 5
Enter the value of num2: 3
num1 > num2= True
num2 > num1=False
Program Explanation:
num1 and num2 are Python variable.
input function in Python is used to get the strings of input data from user(or Keybord). The int function typecast or convert the string value to int.
Once when the script executes, the function shows the message.
Enter the value for num1:
we enter the 5 which is in string, after that int function convert this value in the integer format and stores it in the variable num1.
the case is same for next print function.
the function print("\n num1>num2=",(num1>num2)) gives us output num1>num2=True.
and simillarly for
print("\n num2 > num1=",(num2>num1))
the output is num2 > num1=False

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