Introduction to Loops
Every programming language I have tried has some kind of looping construct. Most have more than one. The Python world has two types of loops:
- the for loop and
- the while loop
You will find that the for loop is by far the most popular of the two. Loops are used when you want to do something many times. Usually you will find that you need to do some operation or a set of operations on a piece of data over and over. This is where loops come in. They make it really easy to apply this sort of logic to your data.
Let’s get started learning how these fun structures work!
Get hands-on with 1200+ tech skills courses.