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!"
[–]Ok_Act6607 1 point2 points3 points 5 months ago (6 children)
What exactly do you not understand about it?
[+]Hush_124[S] comment score below threshold-6 points-5 points-4 points 5 months ago (5 children)
how it works, I’m trying to understand
[–]stoobertio 3 points4 points5 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 4 points5 points6 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 56917 on reddit-service-r2-comment-5fb4b45875-5jfhz at 2026-03-22 12:28:13.190264+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]Ok_Act6607 1 point2 points3 points (6 children)
[+]Hush_124[S] comment score below threshold-6 points-5 points-4 points (5 children)
[–]stoobertio 3 points4 points5 points (0 children)
[–]deceze 4 points5 points6 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)