Python-100-Days/Day01-15/code/Day03/verify.py

20 lines
440 B
Python
Raw Normal View History

2018-03-02 00:09:06 +08:00
"""
用户身份验证
Version: 0.1
Author: 骆昊
Date: 2018-02-28
"""
# import getpass
# from getpass import getpass
# from getpass import *
username = input('请输入用户名: ')
password = input('请输入口令: ')
# 输入口令的时候终端中没有回显
# password = getpass.getpass('请输入口令: ')
if username == 'admin' and password == '123456':
2019-05-03 21:17:36 +08:00
print('身份验证成功!')
2018-03-02 00:09:06 +08:00
else:
2019-05-03 21:17:36 +08:00
print('身份验证失败!')