Iterative Statements in Python
Iterative Statements in Python
STATEMENTS
IN PYTHON
Chap 4
Concept of Loop
KRISH_INFO_TECH
for Loop
• The for loop is used when we are sure about the number of
times a loop body will be executed.
• It is also known as a definite loop.
• The for loop in Python is used to iterate over the items of a
sequence in order, such as a list or a tuple for a fixed number
of times.
KRISH_INFO_TECH
While Loop
• The while loop is the simplest of all looping structures.
• This loop can be applied to a program where the number of
iteration is not known beforehand.
• The while loop keeps on executing the block of a statement
as long as the specified test condition evaluates to true.
KRISH_INFO_TECH