### Instruction: Give me a working Python function for binary_search. ### Answer: ```python def binary_search(items, target): low = 0 high = len(items) - 1 while low <= high: mid = (low + high) // 2 value = items[mid] if value == target: return mid if value < target: low = mid + 1 else: high = mid - 1 return -1 ``` ### Instruction: