Problem Solving Using Binary Search In Python