def binarySearch(arr, target): lo = 0 hi = len(arr) while lo < hi: mid = (lo+hi)//2 if target < arr[mid]: hi = mid