<reponame>saileshsmartz/password-generator
import string
import random       #uses random function for creating random passwords for n times

def gen():
    s1 = string.ascii_uppercase

    s2 = string.ascii_lowercase

    s3 = string.digits

    s4 = string.punctuation

    passlen = int(input("enter the password length\n"))

    s = []
    s.extend(list(s1))
    s.extend(list(s2))
    s.extend(list(s3))
    s.extend(list(s4))


    random.shuffle(s)
    pas = ("".join(s[0:passlen]))
    print(pas)

gen()
