You should write or save the password to a variable. Then the password will not be echoed. for example:
import getpass
p=getpass.getpass("Enter the Password:")
Enter the Password:
print (p)
Output on console: pass@123