登录注册

username=input("请输入你的用户名:")

password=input("请输入你的密码:")

with open("小王要变强",mode="w+",encode="utf-8") as f:

  print("{}\n{}".format(username,password))

  print("你很棒,进去了")

i=0

list=[]

while i<3:

  uname=input("请输入你的用户名:")

  pwd=input("请输入你的密码:")

  with open("小王要变强",mode="r+",encode="utf-8") as f1:

    for line in f:

      list.append(line)

    if uname==list[0].strip() and pwd==list[1].strip():

      print("登录成功")

    else:

      print("登录失败")

      print(list)

i+=1     

上一篇:centos 8 英伟达NVIDIA驱动安装


下一篇:struts2_day03属性封装,模型驱动封装,表达式封装