def findPerson(i): personCalled = input( "Search for person {} you interacted with: ".format(i + 1)) personResults = Person.findByCalled(personCalled) if len(personResults) == 0: print(personCalled + " is not in the database, please add it in") return createPerson(personCalled) else: print("Here are the persons found: ") for i in range(0, len(personResults)): print(" {}. {}".format(str(i + 1), personResults[i].called)) i = getIntInput("Type the index of the person you interacted with: ") return personResults[i - 1]