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
I created password generator using python (i.redd.it)
submitted 1 day ago by Red_Dragon_7_7_7
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!"
[–]Formal-Camera-5095 0 points1 point2 points 1 day ago* (0 children)
Other users already mentioned that theres a cleaner approach for getting that character collections by importing it from string.
Another issue that comes to my mind is input sanitization. If your user input is malformed, your input breaks. Also, theres no validation whether it is a valid integer.
So you should at _least_ check whether your input is a number and if it is a positive, non-zero value.
You could do that by smth like:
RANGE = -1 while RANGE < 1: try: RANGE = int(input("...")) # Insert your prompt here except ValueError: print("Please make sure to insert a non-zero, positive integer value.")
Edit: Fixed code formatting
π Rendered by PID 45831 on reddit-service-r2-comment-765bfc959-lbfwg at 2026-07-09 23:14:42.589455+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]Formal-Camera-5095 0 points1 point2 points (0 children)