二分查找只能针对有序数组
def binary_search(array,item):
n=len(array)
point=n//2
while n>=1:
if array[point]==item:
return True
elif array[point]<item:
return binary_search(array[point+1:],item)
else:
return binary_search(array[:point],item)
return False