Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import random
  2. from random import randint
  3. letter = 0
  4. symbol = 0
  5. number = 0
  6. password = ""
  7.  
  8. letter_dict = ["A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "Q", "q", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "W", "w", "X", "x", "Y", "y", "Z", "z"]
  9. num_dict = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  10. sym_dict = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "[", "]", "{", "}", "|", ":", ";", "\'", "\"", ",", ".", "<", ">", "/", "?"]
  11.  
  12. for i in range(10):
  13. which = randint(0, 2)
  14. if which == 0:
  15. which = letter_dict
  16. if which == 1:
  17. which = num_dict
  18. if which == 2:
  19. which = sym_dict
  20. password = password + str(random.choice(which))
  21. print("Your password is", password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement