ABSTRACT

Loops are a fundamental concept in all programming languages. They are essential in nearly every piece of code that I write and my experience is far from unique. Loops are essential because they allow you to systematically iterate over data. Iteration is the process by which you move across a piece of data or collection of data. As we will learn in this section, there are two types of loops in Python:

For loops

While loops