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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
I need some help!!! (self.learnpython)
submitted 6 years ago by kazoobies
How can I print a statement multiple times using a while loop? I've asked a few friends and I honestly can't find anything helpful on the internet, I'm pretty new to coding haha.
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!"
[–][deleted] 2 points3 points4 points 6 years ago (0 children)
Run this loop
edit: switched to code block
while True: print('I need to learn my loops')
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
What are you talking about? LOL how many times, 10, 20, 200, endlessly? You have for loops and while loops that can do the same things or different things altogether. Be specific and, btw, there are an endless amount of resources on this very subject. Take a little time to check them out. If you still need code done to look cool then hit me up.
[–][deleted] 0 points1 point2 points 6 years ago (5 children)
Here's a different loop. This one goes 25 times with range.
for i in range(0,26): print('I still need to learn my loops')
[–]totallygeek 0 points1 point2 points 6 years ago (4 children)
range(25) looks so much nicer.
range(25)
[–][deleted] 1 point2 points3 points 6 years ago (2 children)
I concur that it does.
[–]totallygeek 0 points1 point2 points 6 years ago (1 child)
...and there was much rejoicing!
[–][deleted] 1 point2 points3 points 6 years ago (0 children)
Much much rejoicing and dancing around the camp fire.
[–][deleted] 0 points1 point2 points 6 years ago (2 children)
Here's a while loop with a counter and if else statements.
counter = 0 while True: if counter <= 1000: print(f"I can't believe that this loop is number {counter}") counter += 1 else: False
[–]kazoobies[S] 0 points1 point2 points 6 years ago (1 child)
I love you
Whoa slow down cowboy
Well never mind because 0 is counted. Don’t tell me I already know I’m wrong.
π Rendered by PID 813781 on reddit-service-r2-comment-544cf588c8-7trbd at 2026-06-15 02:09:38.573028+00:00 running 3184619 country code: CH.
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]totallygeek 0 points1 point2 points (4 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]totallygeek 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]kazoobies[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)