code
# Author:黑猴子
import getpass
_username = 'abc'
_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!")
#缩进
'''
ssh if fi
java {}
python中没有上下级关系,一定要顶格写
'''
运行
username:abc
password:abc123
Welcome user abc login...