Created
February 12, 2019 18:54
-
-
Save yyolk/45b558c5109d8d6115951e74f2ffb2f0 to your computer and use it in GitHub Desktop.
generates a random psw of 8-16 of length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
MIN_LEN, MAX_LEN = 8, 16 | |
from random import randint, choice | |
characters = string.ascii_letters + string.punctuation + string.digits | |
password = lambda : "".join(choice(characters) for x in range(randint(MIN_LEN, MAX_LEN))) | |
print(password()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment