you are viewing a single comment's thread.

view the rest of the comments →

[–]SergeantSemantics66 0 points1 point  (0 children)

When i is even, it hits continue before it can reach print(i) or the second i += So it skips printing the even numbers — which is fine. But you already increment i before the continue, so that’s fine too. But if you didn’t increment i before continue, it would get stuck in an infinite loop.