name=input("请输入账号")
password=input("请输入密码")
with open("d:\\a100.txt",mode="w",encoding='UTF-8') as f:
f.write("{}\n{}".format(name,password))
i=0
li = []
while i < 3:
n = input("请输入账号")
m = input("请输入密码")
with open("d:\\a100.txt", mode="r", encoding='UTF-8') as f:
for i in f:
li.append(i)
if n == li[0].strip() and m == li[1].strip():
print("登录成功")
break
else:print("账号密码错")
i = i + 1