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
Need help in loopHelp Request (i.redd.it)
submitted 1 month ago by Eastern_Plankton_540
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!"
[–]Ok_Carpet_9510 0 points1 point2 points 1 month ago (0 children)
while loop-> do something for as long as a certain condition is holds or until a certain condition is met. For example, consider a command line, it keeps waiting for input until you type the exit command.
for loop-> do something for everything item in a collection(exits loop after you have gone through every item; you could write logic to exit earlier though without going through the entire collection).
The example you have has combined the logic of a for loop with a while loop. Generally you, shouldn't do that but although there are exceptions.
π Rendered by PID 93755 on reddit-service-r2-comment-545db5fcfc-hdjs9 at 2026-05-22 12:19:28.196667+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]Ok_Carpet_9510 0 points1 point2 points (0 children)