Editor settings

General settings

Save settings

Learn to program with Python

Less Than Operator #

The less than operator < is a comparison operator in Python used to check if the left value is less than the right value. It returns a boolean value True if the left value is less than the right value, and False otherwise.

For example:

print(5 < 3) # False
print(3 < 5) # True
print(5 < 5) # False

Exercise #

Create a variable less_than to have a value False by using less than operator <

Tests #

  • Variable less_than should be False
  • Use the less than operator <
Output will be displayed here