prajju149 / Codsoft

0 stars 0 forks source link

password generator_task1 #1

Open prajju149 opened 3 months ago

prajju149 commented 3 months ago

import string import random

if name == "main": s1 = string.ascii_lowercase

print(s1)

s2 = string.ascii_uppercase
#print(S2)
s3 = string.digits
#print(s3)
s4 = string.punctuation
#print(s4)
plen = int(input("Enter the password length\n"))
s = []
s.extend(list(s1))
s.extend(list(s2))
s.extend(list(s3))
s.extend(list(s4))

print("Your password is : ")
print("".join(random.sample(s, plen)))
#print("".join(s[0:plen]))
prajju149 commented 3 months ago

this is a password generator application using Python, allowing users to specify the length and complexity of the password.