def check_password(x):
while x != ("admin123"):
x = input("incorrect password \ntry again:")
return x
password = input("please type the password: ")
password = check_password(password)
print ("correct password")
I am trying to replace each character of the user's input with asterisks (*) in IDLE terminal for security reasons, as the user will be inputting a password. I have found some alternatives such as the getpass() module, but the getpass() does not display anything for the user on the terminal IDLE to tell him that he/she is typing. Therefore, I have decided to look for a replacement solution instead of getpass().