-
Notifications
You must be signed in to change notification settings - Fork 0
Home
hack0282 edited this page Apr 24, 2020
·
2 revisions
Welcome to the random-password-generator-python- wiki! #random password generator import string import random
password_characters = string.ascii_letters + string.digits + string.punctuation while True: if input("would you like a password to enter press yes/y or no/n:").lower() not in {'y' or 'yes'}: break length = int(input("enter password length:")) password = ''.join([random.choice(password_characters) #string objectjoin random charcters for _ in range(length)]) print(password)