While Loop is another powerful repetition structure in Python.
Its main difference from For Loop is that:
- For Loop iterates for a fixed amount of time
- While Loop iterates as long as its logical statement is satisfied (It can run infinitely if the statement doesn’t change)
Let’s start with an example: