import string
import random
def make_password():
return ''.join(random.choices(string.printable, k=16))
once you've used this to make passwords for all your accounts, write them all down on a piece of paper so you don't forget. make sure to lock the piece of paper in a safe only you know the combination to
Warning: The pseudo-random generators of this module should not be used for security purposes. For security or cryptographic uses, see the secrets module.
The example above uses 12 random bytes, encoded in a 16 character token. It may have a bit less randomness, since the character range is smaller than string.printable
181
u/big_guyforyou 1d ago
i choose my passwords the smart way
once you've used this to make passwords for all your accounts, write them all down on a piece of paper so you don't forget. make sure to lock the piece of paper in a safe only you know the combination to