Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def random_char(num_of_char):
- charset="".join(chr(x) for x in range(33,127))
- #return charset[random.randint(0,94)]
- password="".join(charset[random.randint(0,94)] for y in range(num_of_char))
- return password
- num_of=1
- while num_of!=0:
- num_of=input("Num of characters? ")
- print (random_char(int(num_of)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement