If we want to execute a group of statements multiple times then we should go for Iterative statements. Python Support 2 types of iterative statements:
To execute some action for every element present sequence then we should go for ‘for’ loop.
syntax:
for x in sequence :
statements
To execute a group of statements iteratively until some condition false, then we should go for while loop.
syntax:
while condition :
statements
A loop which keeps executing forever known as Infinite loop.
A loop inside another loop is nothing but a nested loop.