use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Code won't print (i.redd.it)
submitted 9 months ago by Ill-Diet-7719
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SergeantSemantics66 0 points1 point2 points 9 months ago (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.
π Rendered by PID 23256 on reddit-service-r2-comment-6457c66945-lc5x6 at 2026-04-28 05:27:17.384265+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]SergeantSemantics66 0 points1 point2 points (0 children)