Advertisement
scarygarey

pswrd_gen_function

Jan 12th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import random
  2. from random import choice
  3. from random import randint
  4.  
  5. def password_generator():
  6. length = (input("How long would you like your password to be?"))
  7. p_length =int(length)
  8. password = ""
  9. for i in range(p_length):
  10. password = password + chr(randint(33, 126))
  11. print("Your password is: " + password)
  12.  
  13. password_generator()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement