# Python Loops
Python loops are programming constructs that allow coders to repeatedly execute a block of code until a certain condition is met. <br>
There are two main types of loops in Python.


## for loop:
The ` for loop ` is used to iterate over a sequence such as a list, tuple, string, or range. <br>
In each iteration, the loop variable takes the value of the next element in the sequence. The loop continues until all elements in the sequence are exhausted.


## while loop:
The while loop repeatedly executes a block of code as long as a specified condition is true. <br>
The loop continues until the condition becomes false. It's important to ensure that the condition eventually becomes false; otherwise, the loop will run indefinitely.
<br>
<br>
Both types of loops can be controlled using statements like break (to exit the loop prematurely), continue (to skip the rest of the current iteration and move to the next one), and else (to execute a block of code when the loop finishes normally without encountering a break statement).
