1.查找 : 找数据 二分查找法:必须处理有序的列表 # -*- coding: UTF-8 -*- 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] #print (l.index(10)) def find(l,aim,start = 0,end = None): end = len(l) if end is None else end mid_index = (end - start)