Python Binary Search Algorithm