Is there a way in Python to convert characters as they are being entered by the user to asterisks, like it can be seen on many websites?
For example, if an email use
You may want to check getpass function.
Prompt the user for a password without echoing. The user is prompted using the string prompt, which defaults to 'Password: '. On Unix, the prompt is written to the file-like object stream. stream defaults to the controlling terminal (/dev/tty) or if that is unavailable to sys.stderr (this argument is ignored on Windows).
Note: This module mimics unix password prompts and does not show asterisks.
Usage:
import getpass
getpass.getpass()