Password Generator in Python Use Random or String Module With Letters, Numbers or Special Characters
Password Generator in Python Use Random or String Module With Letters, Numbers or Special Characters
SlideMake.com
Introduction to Password Generators
def generate_password(length):
characters = string.ascii_letters +
string.digits + string.punctuation
password =
''.join(random.choice(characters) for _
in range(length))
return password
print(generate_password(12))
References
Python Documentation:
https://docs.python.org/3/library/rand
om.html
Python Documentation:
https://docs.python.org/3/library/string
.html