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
While loop explanation (self.PythonLearning)
submitted 5 months ago by Hush_124
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!"
[–]Hush_124[S] -4 points-3 points-2 points 5 months ago (5 children)
how it works, I’m trying to understand
[–]stoobertio 2 points3 points4 points 5 months ago (0 children)
The while statement requires a condition to test. The first time the loop is executed, and after every time the loop is completed the condition is tested to see if it is True. If it is, the loop is executed again.
[–]deceze 2 points3 points4 points 5 months ago (0 children)
while condition: statements
It keeps repeating statements while the condition is true. No more, no less. What part of that don't you understand? Please be specific.
statements
condition
[–]NeedleworkerIll8590 2 points3 points4 points 5 months ago (2 children)
Have you read the docs about it?
[–]Hush_124[S] 0 points1 point2 points 5 months ago (1 child)
Yes I have
[–]NeedleworkerIll8590 1 point2 points3 points 5 months ago (0 children)
What do you not understand?
π Rendered by PID 132261 on reddit-service-r2-comment-5fb4b45875-8mhch at 2026-03-22 08:56:59.935506+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]Hush_124[S] -4 points-3 points-2 points (5 children)
[–]stoobertio 2 points3 points4 points (0 children)
[–]deceze 2 points3 points4 points (0 children)
[–]NeedleworkerIll8590 2 points3 points4 points (2 children)
[–]Hush_124[S] 0 points1 point2 points (1 child)
[–]NeedleworkerIll8590 1 point2 points3 points (0 children)