1def binary_search(group, suspect):
2 group.sort()
3 midpoint = len(group)//2
4 while(True):
5 if(group[midpoint] == suspect):
6 return midpoint
7 if(suspect > group[midpoint]):
8 group = group[midpoint]
9 if(suspect < group[midpoint]):
10 group = group[0: midpoint]
11 midpoint = (len(group)//2)