This is a binary search implementation with python