I was thinking that you want the user to enter the username again after hitting the "Enter" button if thoughts.
While True: if prompt_username in names: print('The user exists!') prompt_username = input(prompt_message) else: break