#!/uer/bin/python # coding utf-8 user = input('请输入用户') pwd =input('请输入密码') if user =="huang" and pwd =="123": print("恭喜你登录成功!") else: print("登录失败请重新登录")
运行结果:
请输入用户huang请输入密码123恭喜你登录成功!