Conditional statements

Conditional statements in Python are used to execute a specific block of code based on the truth value of a condition. The most common conditional statements in Python are if , elif and else . These allow the program to react differently depending on whether a condition (or a series of conditions) is true or false.

Documentation (Please read sections on if-else and match)