Advertisement
asweigart

Untitled

Nov 29th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. def isInDeepList(needle, haystack):
  2. for i, string in enumerate(haystack):
  3. if isinstance(haystack[i], list):
  4. if isInDeepList(needle, haystack[i]):
  5. return True
  6. if needle in string:
  7. return True
  8. return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement