判断一个用户,密码是否对
#!/usr/bin/env python
# -*- coding:utf-8 -*-
_username="Lucky"
_password="123"
username=input("username:")
password=input("password:")
if _username==username and _password==password:
print("welcome to login system!")
else:
print("invalid username or password!")
2.结果如图:
时间: 2024-12-22 02:38:20