Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from random import randint
- letter = 0
- symbol = 0
- number = 0
- password = ""
- 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"]
- num_dict = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- sym_dict = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "[", "]", "{", "}", "|", ":", ";", "\'", "\"", ",", ".", "<", ">", "/", "?"]
- for i in range(10):
- which = randint(0, 2)
- if which == 0:
- which = letter_dict
- if which == 1:
- which = num_dict
- if which == 2:
- which = sym_dict
- password = password + str(random.choice(which))
- print("Your password is", password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement