While loop should use:
    
    
    while lo <= hi:
    
    
    Run

Or it would fail on lists of length 1.

And this change also needed:
    
    
    else:
          lo = m + 1
    
    
    Run

Otherwise search gets stuck on last two elements of list, when x > last element.

Reply via email to