-1
def logInOkay():
print("You must login before proceeding")
userId = input("User ID")
userPw = input("Password")
if (userId=="Mr Leeman") and (userPw=="Treeroad!"):
return True
else:
print("Error in userId or password")
return False
我需要能够输入(treeroad!),但它需要隐藏并用星号替换。我如何在我的python程序中输入密码以显示为星号
similar:https://stackoverflow.com/questions/35805078/how-do-i-convert-a-password-into-asterisks-while-it-is-being-entered/35805111 – akp