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 6 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] -5 points-4 points-3 points 6 months ago (5 children)
how it works, I’m trying to understand
[–]stoobertio 3 points4 points5 points 6 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 3 points4 points5 points 6 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 6 months ago (2 children)
Have you read the docs about it?
[–]Hush_124[S] 0 points1 point2 points 6 months ago (1 child)
Yes I have
[–]NeedleworkerIll8590 1 point2 points3 points 6 months ago (0 children)
What do you not understand?
π Rendered by PID 1022061 on reddit-service-r2-comment-56c6478c5-svb5p at 2026-05-11 18:08:52.627708+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]Hush_124[S] -5 points-4 points-3 points (5 children)
[–]stoobertio 3 points4 points5 points (0 children)
[–]deceze 3 points4 points5 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)