When I started learning Python, I understood variables, data types, conditionals, and functions. But there was one concept I knew I couldn't avoid for long: loops.

Loops are one of those programming concepts that seem simple when someone explains them, but actually using them in a project is where things start to make sense.

After learning and practicing them, I decided to write about what I learned and how I used loops in my first Python projects.

What Is a Loop?

A loop allows us to repeat a block of code multiple times without writing the same code over and over again.