password generator using random module
import random def password_generator(n): chars = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*" password = "" for i in range(n): password += random.choice(chars) return password password_generator(15)