p=[1,2,3,4,5,7,23,32,45,51,52,198]
#y=7
y=198
#y=197
def bsearch(List, value, low, high):
    if high < low:
        return -1
    mid = (low + high)/2
    if List[mid] > value:
        return bsearch(List, value, low, mid-1)
    elif List[mid] < value:
        return bsearch(List, value, mid+1, high)
    else:
        return mid
x=bsearch(p,y,0,len(p)-1)
if (x==-1):
  print "not found"
else:
  print "found at position", x+1
