The Python programming language controls the flow of program execution through the use of conditionals, for loops (including the statements break and continue within them), and functions.
Flow control
Conditionals
If a particular condition is met, a certain amount of code can be executed using the if statement. If the condition is not met, then we can execute the code following the else statement. If the first condition is not met, we can set the next condition for the code to be executed using the elif statement.
Input:
# source_code/appendix_c_python/example09_if_else_elif.py x = 10 if x == 10: print 'The variable x is equal to 10.' ...