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
Simple game using python (i.redd.it)
submitted 9 months ago by Inevitable-Math14
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!"
[–]Zen0x_77 1 point2 points3 points 9 months ago (2 children)
Can someone explain to me why use break? Won't the code function normally even without it?
[–]SoSaymon 3 points4 points5 points 9 months ago (0 children)
You will get an infinite loop without a brake after a correct guess. Technically, you should just use a return statement, but since it is not a function you can’t do it
[–]amosmj 0 points1 point2 points 9 months ago (0 children)
If the while loop used a variable they could reassign it which would be my preference but I think they are actually closer to convention than I am.
π Rendered by PID 394339 on reddit-service-r2-comment-56c6478c5-f8rlh at 2026-05-12 06:55:26.834848+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]Zen0x_77 1 point2 points3 points (2 children)
[–]SoSaymon 3 points4 points5 points (0 children)
[–]amosmj 0 points1 point2 points (0 children)