while - To create a while loop

Loops while the condition is true.

Example

Python
x = 0
while x < 5:
    print(x)
    x = x + 1

Output

0
1
2
3
4