Conditional execution can be completed using the if statement.
if
syntax
if expression:
# code to execute
elif expression:
# code to execute
else:
# code to execute
Boolean values can be either False
or True
- x or y - If either x OR y is true, the expression is executed
- x and y - If x AND y are both true, the expression is executed
- < less than
- < greater than
- == is equal to
- >= greater than or equal to
- <= less than or equal to
- != not equal to
- x in [a,b,c] Does x match the value of a, b, or c