0

I don't understand the continue statement in while loops. How does it work?

https://code.sololearn.com/cCYPJHQnASFO/?ref=app

24th Sep 2017, 5:10 PM
Beck_hee
3 ответов
+ 4
continue stops the current iteration of the loop at the continue statement and jumps to the next iteration of the loop. x = 0 while x < 10: x += 1 if x % 2 == 0: continue print(x) here if x is an even number then then print statement is skipped and the loop jumps to the next iteration.
24th Sep 2017, 5:20 PM
ChaoticDawg
ChaoticDawg - avatar
0
thanks a lot guys
24th Sep 2017, 5:25 PM
Beck_hee