Skip to content

Instantly share code, notes, and snippets.

@oddjobz
Created September 9, 2017 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oddjobz/6cbdcde08c3c16403395310392108237 to your computer and use it in GitHub Desktop.
Save oddjobz/6cbdcde08c3c16403395310392108237 to your computer and use it in GitHub Desktop.
Code Test: return True if sequence appears in array
def isinarray_str(arr, seq):
return str(seq).strip('[]') in str(arr).strip('[]')
print(isinarray_str([1,2,3,4,5,6], [3,4]))
print(isinarray_str([1,2,3,4,5,6], [3,5]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment