# -*- coding:utf-8 -*- # Auther:Leon import getpass user=input("请输入帐号:") pwd=getpass.getpass("请输入密码:") if user == "leon" and pwd == "leon" : print("logs-in successfully") else: print("Username or Password NG")
ps:python
Python实现星号遮掩的密码输入参考:http://blog.csdn.net/sbdxxcjh/article/details/39120095ide