How do I convert a password into asterisks while it is being entered? [duplicate] December 19, 2023 by Tarik There is getpass(), a function which hides the user input. import getpass password = getpass.getpass() print(password)