Skip to content

Instantly share code, notes, and snippets.

@mmanylov-zz
Created November 18, 2018 02:53
Show Gist options
  • Save mmanylov-zz/4889ea7be14548f7145785f4532f27f6 to your computer and use it in GitHub Desktop.
Save mmanylov-zz/4889ea7be14548f7145785f4532f27f6 to your computer and use it in GitHub Desktop.
import secrets
import string
length = 0
while(length < 1):
length = int(input("Input pass length: "))
alphabet = string.ascii_letters + string.digits
password = ''.join(secrets.choice(alphabet) for i in range(length)) # for a 20-character password
print(password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment