暗文密码输入

import getpass

_usrname = "Alex"
_password = "123"

username = input("username:")
password = getpass.getpass("password:")

if _usrname == username and _password == password:
    print("Welcome user {name} login...".format(name=username))
else:
    print("Invalid username or password!")


#在pycharm中getpass不好使,会卡机