Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. Aufgabenstellung
  5. Passwort erzeugen
  6. '''
  7. import random, string
  8.  
  9. def generator_pw():
  10. pwd = string.ascii_letters + string.punctuation + string.digits
  11. return "".join(random.choice(pwd) for x in range(random.randint(10, 10)))
  12.  
  13. stripped = lambda s: "".join(i for i in s if 31 < ord(i) < 127)
  14.  
  15. print(stripped("\ba\x00b\n\rc\fd\xc3"))
  16.  
  17. print ("Das Passwor ist:", generator_pw() )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement