csc-python-solutions/16/7 - Searching a Nested List.py
2021-02-17 14:06:33 +01:00

10 lines
219 B
Python

def nestedListContains(NL, target):
if isinstance(NL, int):
if NL == target:
return True
return False
for i in NL:
if nestedListContains(i, target):
return True
return False