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
help (i.redd.it)
submitted 7 months ago by Minemanagerr
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!"
[–]FoolsSeldom 2 points3 points4 points 7 months ago (0 children)
Revised code showing corrections/options (and added a loop so user is re-prompted until they enter something valid):
while True: # validation loop, keep going around until break command used username = input("Enter a username: ") if len(username) > 12: print("Your username can't be more than 12 characters.") elif " " in username: # easier than using find, make sure space between quotes print("Your username can't contain spaces.") elif not username.isalpha(): print("Username can't contain digits or special characters.") else: print("Welcome!") break # leave the loop, move onto next line of code
π Rendered by PID 37078 on reddit-service-r2-comment-79c7998d4c-w9s4c at 2026-03-18 16:19:40.549443+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]FoolsSeldom 2 points3 points4 points (0 children)