Untitled
unknown
plain_text
a year ago
692 B
7
Indexable
import random import string def generate_username(length=8): # Generate a random username consisting of lowercase letters return ''.join(random.choices(string.ascii_lowercase, k=length)) def generate_password(length=12): # Generate a random password consisting of uppercase letters, lowercase letters, digits, and special characters characters = string.ascii_letters + string.digits + string.punctuation return ''.join(random.choices(characters, k=length)) def main(): username = generate_username() password = generate_password() print("Generated Username:", username) print("Generated Password:", password) if __name__ == "__main__": main()
Editor is loading...
Leave a Comment