---

Python while Loop

Loops are one of the fundamental concepts of programming languages. Loops are handy when you want to repeat a specific block of code a number of times until a given condition is met.

There are two basic loop constructs in Python, for and while loops.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis