Python loops are used to iterate the sequential data. Python loops are,
Ø For loop
Ø While loop
Ø Nested loop
For loop is used to execute sequential data. It loops based on length of the sequential data.
Example1: This example shows how to iterate string value.
Example2: How to print List data.
Example3: How to print tuple data.
Example4: How to print dictionary data.
While loop is mainly used to continuous iteration. This is a very danger loop, you should handle this otherwise program will not stop. It iterates continuously.
Eample1: Without handling the loop
Example2: with handling the loop.