首页 > 代码库 > 用户交互

用户交互

#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Andy Chen

_username = ‘alex‘
_password = ‘abc123‘
username = raw_input("username:")
#password = getpass.getpass("password:")
password = raw_input("password:")

if _username == username and _password == password:
print"你成功登陆"
else:
print"你输入的用户无效"

用户交互