How to check if a value is less than another value in Python

Checking if a value is less than another value returns True if the former is less than the latter, and False otherwise. For example, 1 < 2 returns True.

Solution for How to check if a value is less than another value in Python : You can use the < operator to check if a value is greater than another value Insert the less-than operator < in between two values to create a boolean expression that returns True if the left value is less than the right value and False if otherwise.

is_less_than = 2 < 1


how-to-check-if-a-value-is-less-than-another-value-in-python