首页 > 代码库 > Python小程序

Python小程序

 1 password_list = [*#*#, 123]
 2 def account_login():
 3     password = input(PassWord: )
 4     verify_password = password == password_list[-1]
 5     reset_password = password == password_list[0]
 6     if verify_password:
 7         print("登录成功")
 8     elif reset_password:
 9         new_password = input(请输入要重置的密码: )
10         password_list.append(new_password)
11         print(您的密码已经重置成功,请输入重置后的密码登录)
12         account_login()
13     else:
14         print("密码错误,请重新输入,或输入‘*#*#‘重置密码!")
15         account_login()
16 account_login()

 

Python小程序