Python If Or
Or
The or keyword is a logical operator, and
is used to combine conditional statements:
Example
Test if a is greater than
b, OR if a
is greater than c:
a = 200
b = 33
c = 500
if a> b or a > c:
print("At least one of the conditions is True")
Try it Yourself »
b = 33
c = 500
if a> b or a > c:
print("At least one of the conditions is True")
Related Pages
Python If...Else Tutorial If statement If Indentation Elif Else Shorthand If Shorthand If Else If AND If NOT Nested If The pass keyword in If