Loops are used to repeat a block of code multiple times. Python mainly uses for loop and while loop
for loop: Used to iterate over a sequence (list, tuple, string, range). Runs for a fixed number of times. Commonly used when the number of iterations is known.
while loop: Executes as long as a condition is true. Used when the number of iterations is not fixed. Condition must be updated to avoid infinite loops.