Python while Keyword
Print x as long as x is less than 9:
while x < 9:
x = x + 1
Definition and Usage
while keyword is used to create a
A while loop will continue until the statement is false.
keyword to create a for loop.
keyword to break out of a loop.
Read more about while loops in our Python While Loops Tutorial.