Skip to content

Instantly share code, notes, and snippets.

@CodeMaster7000
Last active January 1, 2022 21:53
Show Gist options
  • Save CodeMaster7000/02ff392f446912277064166c0aad40ec to your computer and use it in GitHub Desktop.
Save CodeMaster7000/02ff392f446912277064166c0aad40ec to your computer and use it in GitHub Desktop.
A Random Password Generator in Python. The output is a string of upper case and lower case letters.
import random
import string
def get_secure_password(length):
result_str = ''.join(random.choice(string.ascii_letters) for i in range(length))
print(result_str)
get_secure_password(8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment