2. The or
Operator. In Python, the or
operator is used to combine two conditions. It returns True
if at least one of the conditions is True
, and False
otherwise.
For example, the expression (x > 5) or (y < 10)
evaluates to True
if either x
is greater than 5 or y
is less than 10 (or both).