Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import SystemRandom
- from string import printable
- def random_char():
- return SystemRandom().choice(printable[:-5])
- def random_password(length=16):
- chars = [random_char() for _ in range(length)]
- return ''.join(chars)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement