python -13-模拟用户登入

# coding=utf-8
username = "python"
psw = "123456"

while True:
    username_input = input("请输入用户名:")
    psw_input = input("请输入密码:")
    if (username_input == username) and (psw_input == psw):

        print("登入系统成功")
        break

    else:
        print("密码错误,请重新输入")

你可能感兴趣的:(python -13-模拟用户登入)