<prompt> Kuandika kazi ya kutekeleza binary search kwa orodha ya integer.  <response>: def binary_searcharr, target: left 0 right lenarr-1 while left right: mid leftright 2 if arrmid target: return mid elif target arrmid: right mid - 1 else: left mid 1 return -1 