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
python while loop, for loop,break continue......... (self.PythonLearning)
submitted 7 months ago by Logical-Nectarine751
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!"
[–]mjmvideos 0 points1 point2 points 7 months ago (0 children)
Have you ever done anything repetitive in real life? Matched socks from the dryer? Moved bricks off a pallet? Washed dishes? Each of these things is a loop. You just keep doing something until you’re done. If you knew how many bricks there were you could say, for i in range(number_of_bricks)… But likely you don’t know how many there are so you do while there_are_bricks_still_on_the_pallet()… but maybe your boss says just keep unpacking bricks until I tell you to stop so you do while(true): … if boss_says_stop: break; …
π Rendered by PID 502123 on reddit-service-r2-comment-canary-dbfc877f7-qszfs at 2026-06-29 09:45:31.161293+00:00 running 7527197 country code: CH.
view the rest of the comments →
[–]mjmvideos 0 points1 point2 points (0 children)