class Solution:

    def search(self, nums: List[int], target: int) ->int:
        if len(nums) == 0:
            return -1
        mid = len(nums) // 2
        if nums[mid] == target:
            print(nums, mid)
            return mid
        elif target < nums[mid]:
            return self.search(nums[:mid], target)
        else:
            a = self.search(nums[mid + 1:], target)
            print(nums, mid)
            return a + (mid + 1) if a is not -1 else -1

949d9caf6541f9741e062cdbff961e8b3cc2f2df
<mask token>

class Solution:
    <mask token>

class Solution:

    def search(self, nums: List[int], target: int) ->int:
        if len(nums) == 0:
            return -1
        mid = len(nums) // 2
        if nums[mid] == target:
            print(nums, mid)
            return mid
        elif target < nums[mid]:
            return self.search(nums[:mid], target)
        else:
            a = self.search(nums[mid + 1:], target)
            print(nums, mid)
            return a + (mid + 1) if a is not -1 else -1
