from getpass import getpass username = input('Enter Username: ') password = getpass('Enter password: ') print("密码输入成功!") print("你的密码是:{}".format(password)) Pycharm中运行后,终端无法运行。 解决方案: 在命令行界面中使用