Create 7 - Searching a Nested List.py
This commit is contained in:
parent
039811ac74
commit
911e5a3bd8
9
16/7 - Searching a Nested List.py
Normal file
9
16/7 - Searching a Nested List.py
Normal file
@ -0,0 +1,9 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user