While Loop in Python :
The while Loop executes a block of code as long as the control condition of the loop is true. The condition of the while loop is executed before any statement inside the loop is executed. After each iteration, the control condition is tested again and the loop continues as long as the condition remains true. When this condition becomes false, the statements in the body of loop are not executed and the control is transferred to the statement immediately following the body of while loop.Â
>>>Count=1
>>>while count <=5:
>>> print (count)
>>> count=count+1
Output:-
1
2
3
4
5