如何在代码中存储日志和密码的数据?

时间:2019-07-02 21:44:08

标签: python

我要存储为日志和密码列表输入的数据

我什么都不做,因为我不知道怎么做

logs = []
passwords=[]
def register():
    log = input("name:")
    password = input("password:")
    logs.append(log)
    passwords.append(password)
def acess():
    checklog = input("name:")
    checkpassword= input("password:")
    if logs.index(checklog) == passwords.index(checkpassword):
        print("ok")
    else:
        print("fail in verification")

我希望下次重新打开程序时,以前插入的日志和密码已经注册

0 个答案:

没有答案