-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

I need to be able to enter (treeroad!), but it need to be hidden and replaced with asterisk.

  • similar: https://stackoverflow.com/questions/35805078/how-do-i-convert-a-password-into-asterisks-while-it-is-being-entered/35805111 – akp Aug 31 '17 at 13:17

1 Answers1

0

You'll need to use getch() instead of input().

Refer to the answers on this post.

Treyten Carey
  • 641
  • 7
  • 17