Password Generator

        Welcome to password Generator Code



This is password generator code. You can set the length of password.



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

if __name__ == "__main__":
length = int(input("Enter the length of the password: "))
password = generate_password(length)
print("Generated Password:", password)

Comments

Popular posts from this blog

Screen Recording using python.

wallpaper changer.

Find any color from image using python