Python Script Binary Search