在數組中查找符合的數字,並返回序列號數組
def find(list, item):it
low =0while
hith =len(list)-1數字
while low <= hith:return
mid =int((low + hith) /2)
if list[mid] == item:
return mid
if list[mid] < item:
low = mid +1
else:
hith = hith -1
return None
list = [1,2,3,4,5,6,7,8,9]
item =7
print(find(list, item))