Use the if-else
statements in Python for conditional decision-making
In Python programming, flow control is the order in which statements or blocks of code are executed at runtime based on a condition.
Table of contents
- Control Flow Statements
- Conditional statements
- Iterative statements
- Transfer statements
- If statement in Python
- If – else statement
- Chain multiple if statement in Python
- Nested if-else statement
- Single statement suites
- for loop in Python
- While loop in Python
- Break Statement in Python
- Continue statement in python
- Pass statement in Python
Control Flow Statements
The flow control statements are divided into three categories
- Conditional statements: In Python, condition statements act depending on whether a given condition is true or false. You can execute different blocks of codes depending on the outcome of a condition. Condition statements always evaluate to either True or False.
- Iterative statements: In Python, iterative statements allow us to execute a block of code repeatedly as long as the condition is True. We also call it a loop statements.
- Transfer statements: In Python, transfer statements are used to alter the program’s way of execution in a certain manner.

CONDITIONAL STATEMENT
‣
1. If
statement
‣
2. If
– else
statement
‣
3.Nested If
- else
statement
‣
4.If-elif-else
statement
ITERATIVE STATEMENT
‣
1. for
loop
‣
2. While
loop
TRANSFER STATEMENT
‣
1. Break
Statement
‣
2.Continue
Statement
‣