File size: 643 Bytes
f1a2ec8 9509d1d f1a2ec8 9509d1d f1a2ec8 9509d1d f1a2ec8 9509d1d f1a2ec8 9509d1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate a random strong password with 16 characters.
"""
import random
import string
def generate_password(length=16):
"""
Generate a random password with the given length.
:param length: Length of the password to generate (default is 16)
:return: A randomly generated password string
"""
characters = string.ascii_letters + string.digits + string.punctuation
password = ''.join(random.choice(characters) for _ in range(length))
return password
# Generate a strong 16-character long password
STRONG_PASSWORD = generate_password()
print(STRONG_PASSWORD)
|