TypeError: list indices must be integers, not float
I have a python 3.x program that is producing an error: def main(): names = ['Ava Fischer', 'Bob White', 'Chris Rich', 'Danielle Porter', 'Gordon Pike', 'Hannah Beauregard', 'Matt Hoyle', 'Ross Harrison', 'Sasha Ricci', 'Xavier Adams'] entered = input('Enter the name of whom you would you like to search for:') binary_search(names, entered) if position == -1: print("Sorry the name entered is not part of the list.") else: print(entered, " is part of the list and is number ", position, " on the list.") input('Press<enter>') def binary_search(names, entered): first = 0 last = len(names) - 1