Python: Password generator

By DaLuSt | Random programming tools | 3 Jan 2022

Password generator

For the next semi-useless simple tool, my first attempt at a very basic password generator.


import string
from random import *

characters = string.ascii_letters + string.punctuation  + string.digits # pasword build-up
password =  "".join(choice(characters) for x in range(randint(8, 16))) # pasword length



5 x print



e3:{[email protected]~pKna



Ps. if you know a way to print an x number of random passwords into a list with this generator, please let me know. 

Thanks for stopping by the semi-useless post. :)





How do you rate this article?




This is a story about a young dutch adolescent who studies Biomedical Research. Join him in his epic quest to find the one thing that everyone seeks, the ever-growing need for entertainment.

Random programming tools
Random programming tools

The place to learn about completely useless programming code is certainly not to be taken seriously, but still, a place to try some completely random code which I find on my journey in becoming a data scientist. Mainly in Python or R, but who knows what the future will bring.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.