Password Generator in PYTHON October 29, 2021 Password Generator in Python:-import string import random import time s1 = string.ascii_lowercase s2 = string.ascii_uppercase s3 = string.digits s4 = string.punctuation password_length = input("Enter the length of password you want = ") password_length = int(password_length) password_list = [] a = input("Do you want lowercase letters in your password? (y/n): ") if a is "y": password_list.extend(s1) else: pass b = input("Do you want uppercase letters in your password? (y/n): ") if b is "y": password_list.extend(s2) else: pass c = input("Do you want numbers in your password? (y/n):") if c is "y": password_list.extend(s3) else: pass d = input("Do you want punctuations in your password? (y/n): ") if d is "y": password_list.extend(s4) else: pass random.shuffle(password_list) print("Generating the strongest password...") time.sleep(3) print("\n") print("Your password is :") print("".join(password_list[0:password_length])) print("\n") Hope this help you!John VeerBasic Python ProjectsContact mail id - john.veer.utube@gmail.comThanks for reading!www.basicpythonprogramme.blogspot.comwww.basicpythonprojects.blogspot.com Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment