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