Recursive code returns None [duplicate]

You probably want a return on the last line:

return isIn(char, aStr)

Without it, the function simply returns None when it terminates without seeing a return.

Leave a Comment