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

Binary to Number converter.

Python Tkinter QR Code Generator

color guessing game with GUI using python