#二分查找算法 必须处理有序的列表
l = [2,3,5,10,15,16,18,22,26,30,32,35,41,42,43,55,56,66,67,69,72,76,82,83,88]
#代码实现
def find(l,aim):
mid_index = len(l) // 2
if l[mid_index] < aim:
new_l = l[mid_index+1 :]
find(new_l,aim)
elif l[mid_index] > aim:
new_l = l[:mid_index]
find(new_l, aim)
else:
print('找到了',mid_index,l[mid_index])
find(l,66)