The while Loop
With the while loop we can execute a set of statements as long as a condition is true.
Print i as long as i is less than 6:
while i < 6:
i += 1
Note: remember to increment i, or else the loop will continue forever.
The while loop requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.