Skip to content

Instantly share code, notes, and snippets.

@paulo-raca
Created August 9, 2024 22:10
Show Gist options
  • Save paulo-raca/82c039a05cf514b4b28d795b4554d5ff to your computer and use it in GitHub Desktop.
Save paulo-raca/82c039a05cf514b4b28d795b4554d5ff to your computer and use it in GitHub Desktop.
Generate secure random password
#!/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