Skip to content

Instantly share code, notes, and snippets.

@alxmtr
Created March 5, 2019 10:50
Show Gist options
  • Save alxmtr/deb77a124e17874369723d8da8f0b8a5 to your computer and use it in GitHub Desktop.
Save alxmtr/deb77a124e17874369723d8da8f0b8a5 to your computer and use it in GitHub Desktop.
from random import sample
from string import ascii_letters, digits
def generate_password(length):
return ''.join(sample(ascii_letters + digits, length))
print(generate_password(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment