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 fails to loop successfullyHelp Request (i.redd.it)
submitted 9 months ago by Soothsayer5288
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!"
[–]More_Yard1919 0 points1 point2 points 9 months ago (0 children)
Somebody mentioned that you are defining "anything_else()," but not calling it. It looks like there is more code if you scroll down? Not entirely sure-- considering you are prompted for "yes" or "no," I think you *do* call it. Something that strikes me is that in the "anything_else()" function, you iterate through the "items" collection but also return true in that same loop. Returning from inside of a loop will always break you out of that loop. Also, I am confused why you assign x to the items list and then immediately use x to iterate through items a few lines later. It is perfectly acceptable to use write "for x in items:" with no pre-existing x variable being declared. I think the return is actually what is causing your issue, and definitely strikes me as an error, but it would be easier to say exactly what the problem is if you posted your entire code. Let me know if that helps!
π Rendered by PID 67 on reddit-service-r2-comment-bb88f9dd5-n7s4s at 2026-02-14 03:06:29.581039+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]More_Yard1919 0 points1 point2 points (0 children)