An infinite loop

This is the simplest form of while loop and it will keep repeating forever.

Breaking out of a while loop

Here we use a break statement to break out of the loop.

Continue in while loops

Sometimes you don’t want to break out of the loop, you just want to skip to the next iteration of the loop. For this you can use a continue statement.

Conditional while loops

So far all our while loops have been infinite and we have used an if statement with  a break to break out of the loop. A while loop is designed to used conditions, you just replace the True with a condition instead!

Let's learn Python YouTube Video -Loops
Let’s learn Python YouTube Video -Loops