Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- '''
- Aufgabenstellung
- Passwort erzeugen
- '''
- import random, string
- def generator_pw():
- pwd = string.ascii_letters + string.punctuation + string.digits
- return "".join(random.choice(pwd) for x in range(random.randint(10, 10)))
- stripped = lambda s: "".join(i for i in s if 31 < ord(i) < 127)
- print(stripped("\ba\x00b\n\rc\fd\xc3"))
- print ("Das Passwor ist:", generator_pw() )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement