Pan*_*chi 1 python password-protection python-3.5
有没有办法让python输入密码???
代替:
Whats your password?
password <--- this is a user input
Run Code Online (Sandbox Code Playgroud)
我需要:
Whats your password?
******** <--- this is a user input
Run Code Online (Sandbox Code Playgroud)
这在Python中可能吗?
您可以使用以下命令隐藏输入getpass:
import getpass
password = getpass.getpass("Whats your password?")
Run Code Online (Sandbox Code Playgroud)