users = { "admin": { "password": "1234" }, "unique": { "password": "7894", }, "asewe":{ "password": "5478", }, } count = 3 while count>0: username_input = input("please enter the username: ") password_input = input("please enter the password: ") if username_input in users: if password_input in username_input: print("login has been succesfully") else: print("password is wrong") else: print("username is not defined")