I am trying to find a character in an alphabetized string... Here is the code

```
def isIn(char, aStr):

        middleChar = len(aStr)//2
        if char == aStr[middleChar]:
            return True
        elif char < aStr[middleChar]:
            LowerHalf = aStr[:middleChar]
            return isIn(char, LowerHalf)
        elif char > aStr[middleChar]:
            UpperHalf = aStr[middleChar:]
            return isIn(char, UpperHalf)
        else:
            return False

print(isIn('a', 'abc'))

```

It returns True. But When I put

```
print(isIn('d', 'abc'))

```

it returns this error: maximum recursion depth exceeded in comparison; instead of False.

I don't understand whats wrong. Please tell me where is the logical mistake I am doing.