input: Write a function to search for a target value in a sorted array using a binary search algorithm. If the target value is found in the array, return True, otherwise return False.
  def binarySearch(array, target):
   # Find the middle of the array
   mid = len(array) // 2
   
   # Check if the target is equal to the middle value 
   if array[mid] == target:
    return True
   
   # If the target is less than the middle value, search the left half
   elif target < array[mid]:
    return binarySearch(array[:mid], target)
    
   # If the target is greater than the middle value, search the right half
   elif target > array[mid]:
    return binarySearch(array[mid+1:], target)
   
   # If the target is not found
   else:
    return False
  
  assert binarySearch([1, 2, 3, 4, 5, 6, 7], 5) == True
  assert binarySearch([1, 2, 3, 4, 6, 7], 5) == False
  assert binarySearch([], 5) == False
output: def binarySearch(array, target):
      if not array:
          return False
      mid = len(array) // 2
      if array[mid] == target:
          return True
      elif target < array[mid]:
          return binarySearch(array[:mid], target)
      else:
          return binarySearch(array[mid+1:], target)