Код: Выделить всё
#imports
import string
import secrets
#strings and variables
selection_list = string.ascii_letters + string.digits + string.punctuation
special_chars = string.punctuation
length = 29
#main code
from random import sample, choice
password = ''
for i in range(length):
password+= ''. join(secrets.choice(selection_list))
#inputs
while True:
platform = input("put the name of the platform here: ")
login = input("put the email or usernamer here : ")
#printing and writing to file
f = open("/home/matthies/Dokumente/pwords/passwörter.txt", "a")
f.write(platform)
f.write(" \n")
f.write(login)
f.write(" \n")
f.write(password)
f.write(" \n")
f.write(" \n")
f.close()
print(platform, login, password)
if platform == "exit":
break
Пожалуйста, дайте мне несколько отзывов и предложений по поводу улучшение этой программы.
Подробнее здесь: https://stackoverflow.com/questions/788 ... -generator