I am trying to write a Python 3 recursive function which will tell me if an integer is in a nested list. I am not sure how I can make my code return `True` if it finds it in the list, and `False` if it doesn't find it in the list. When I print the result of my for loop, I get a bunch of 

```
false
false
false
false
true
false
false
false

```

etc. But, it returns False because the last call was false, even though I want it to return true. How can I fix this?

Here is my code:

```
def nestedListContains(NL, target):    
    if( isinstance(NL, int) ):
        return NL    

    for i in range(0, len(NL)):
       return ( nestedListContains(NL[i], target) == target )

    return False

```

And here is how I'm calling it

```
print(nestedListContains([[3], [4,5,7], [[[8]]]], 8))

```

EDIT: This seems to be working for me, but it seems rather ghetto:

```
def nestedListContains(NL, target):    
    if( isinstance(NL, int) ):
        if( NL == target ):
            return 1
        return 0

    x = 0

    for n in NL:
        x += nestedListContains(n, target) == 1        

    return x != 0

```