While

With the while loop we can execute a set of statements as long as a condition is true.


i = 1 
while i < 6:
print(i)
i += 1



Exit The Loop





Continue Statement

With the continue statement we can stop the current iteration, and continue with the next:


i = 0 
while i < 6:
i += 1
if i == 3:
continue
print(i)





© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrev