while loop
The while loop continues to execute as long as a specified condition is True.
while
loop Syntax:
while expression: # statement to be executed if the expression evaluates to true
Examples:
# Using a while loop to print numbers from 1 to 5count = 1while count <= 5: print(count) count += 1