TypeError: list indices must be integers, not float

前端 未结 4 603
感情败类
感情败类 2021-02-05 02:47

I have a python 3.x program that is producing an error:

def main():
    names = [\'Ava Fischer\', \'Bob White\', \'Chris Rich\', \'Danielle Porter\',
                    


        
4条回答
  •  再見小時候
    2021-02-05 03:36

    I can be wrong but this line:

    binary_search(names, entered)
    

    would not be

    position = binary_search(names, entered)
    

提交回复
热议问题