Iterative Binary Search Python Code