Conditions usually involve comparing values:
x == y # Equal to
x != y # Not equal to
x > y # Greater than
x < y # Less than
x >= y # Greater than or equal to
x <= y # Less than or equal to
Notice == for comparison vs = for assignment. This is a common beginner mistake. if x = 5 is an error. if x == 5 checks if x equals .
These operators return True or False. 5 > 3 is True. 2 == 7 is False. You can use them directly in conditions or store their results in boolean variables.