Search code examples
python

Can I get console input without echo in Python?


Can I get console input without echo in Python?


Solution

  • Use getpass:

    >>> from getpass import getpass
    >>> getpass()
    Password:
    'secret'