I wrote the following function in order to implement my own binary search
def bisect(input, target):
mid = len(input)/ 2
if len(input) == 1:
You are ignoring the return values of recursive calls. You need to explicitly return those too:
elif input[mid] > target:
return bisect(input[:mid], target)
elif input[mid] <= target:
return bisect(input[mid:], target)
Recursive calls are just like any other function call; they return a result to the caller. If you ignore the return value and the calling function then ends, you end up with that calling function then returning None
instead.