Python – While Loop:

In this tutorial, we will learn about while loop. In python, while loop is used to iterate until the condition is satisfied. If the condition given is not satisfied in the first iteration itself, the block of code inside the loop will not get executed.

In the below example, we have assigned the value of x as zero and started the while loop until the value of x is less than 10 and print the values.

Example:

Below is the Output:

Just changed the values for the above example and below is the output.

w is the output: