What is a loop?
Loops are a useful control structure for repeating a block of code multiple times. There are several types of loops in most programming languages, but the most basic and commonly used is the for loop.
A for loop in Python has the following syntax:
for item in iterable:
Here, item is a variable that takes on each value in the iterable one at a time, and the indented code block following the for statement is executed once for each value. An iterable is a data type that can be iterated over, such as a list, a tuple, or a string.
Write out an example: