Created
August 9, 2024 22:10
-
-
Save paulo-raca/82c039a05cf514b4b28d795b4554d5ff to your computer and use it in GitHub Desktop.
Generate secure random password
This file contains hidden or 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
#!/usr/bin/env python3 | |
import string | |
import secrets | |
n=16 | |
charset = string.ascii_letters + string.digits + string.punctuation | |
print("".join([secrets.choice(charset) for i in range(n)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment