day01_02 手动交互式密码认证

password.py

# Author:Adminone

import getpass

_username = 'alex'
_password = 'abc123'
username = input("username:")
#password = getpass.getpass("password:")
password = input("password:")
if _username == username and _password == password:
print("Welcome user {name} login...".format(name=username))
else:
print("Invalid username or password!")

posted @ 2021-06-05 22:12  flytoyou  阅读(44)  评论(0编辑  收藏  举报