fork download
  1. from string import ascii_letters, digits
  2. from random import choice
  3.  
  4. length = int(input("length: "))
  5. pass_amount = int(input("pass_amount: "))
  6.  
  7. list1 = ascii_letters + digits
  8. password = str()
  9. counter = 0
  10.  
  11. with open("C:/py/pass.txt", "w") as f:
  12. while counter != pass_amount:
  13. for i in choice(list1):
  14. password += i
  15. if len(password) == length:
  16.  
  17. password += "\n"
  18. f.write(password)
  19. print(password)
  20. counter += 1
  21. password = str()
  22.  
Runtime error #stdin #stdout #stderr 0.04s 11368KB
stdin
Standard input is empty
stdout
length: 
stderr
Traceback (most recent call last):
  File "./prog.py", line 4, in <module>
EOFError: EOF when reading a line