Skip to content
pritibhartigithub edited this page Jun 6, 2023 · 1 revision

import random import string

def generate_password(length=12): characters = string.ascii_letters + string.digits + string.punctuation password = ''.join(random.choice(characters) for _ in range(length)) return password

password = generate_password() print("Generated Password:", password)

Clone this wiki locally