While and For Loops

Learn about while and for loops in Python.

We'll cover the following

Loops

Loops are a programming component that allows you to execute one or more statements repeatedly until the end condition is met. Python has two types of loops: while and for loops.

While loops

While loops continue to execute as long as the end condition is True.

Get hands-on with 1200+ tech skills courses.