About Password Input in Command Line Tools

When writing a Python script that asks for a password, use the getpass module, so that the password is not echoed to the screen:

import getpass

username = input("Username: ").strip()
password = getpass.getpass("Password: ")

Tips and Tricks Programming Python 3