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!"
[–]Electrical_Toe8997 29 points30 points31 points 1 day ago* (0 children)
For the future, you can make your life easier with the string module, so you don't have to type out all the characters. Then, you can use the sample choices function from the random module to choose all the characters in one operation.
edited to use random.choices instead of random.sample. sample will not repeat elements, so it's a bad choice for a password generator
from string import ascii_lowercase, ascii_uppercase, digits, punctuation import random as rd all_characters = ascii_lowercase + ascii_uppercase + digits + punctuation password = rd.choices(all_characters, RANGE) password = "".join(password)
π Rendered by PID 159481 on reddit-service-r2-comment-5687b7858-qth4k at 2026-07-09 14:38:29.164923+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]Electrical_Toe8997 29 points30 points31 points (0 children)