def binary_find(list, target):
left, right = 0, len(list)
while left <= right:
mid = (left + right) // 2
print(list[mid])
list_left = list[left:mid]
print(list_left)
list_right = list[mid+1:right]
print(list_right)
if target == list[mid]:
return mid
elif target in list[left]:
right = mid
else:
left = mid +1
return -1
list = ['1','98','43','22','5','7','9','0','4','2','3','5','18','99','234','123','55']
print(binary_find(list, '1'))
4
['1', '98', '43', '22', '5', '7', '9', '0']
['2', '3', '5', '18', '99', '234', '123', '55']
5
['1', '98', '43', '22']
['7', '9', '0']
43
['1', '98']
['22']
98
['1']
[]
1
[]
[]
0