Skip to content

Instantly share code, notes, and snippets.

@rgherta
Last active January 19, 2017 12:42
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 rgherta/4b9e5377b08a9468e4dd2c84e2d3a0a8 to your computer and use it in GitHub Desktop.
Save rgherta/4b9e5377b08a9468e4dd2c84e2d3a0a8 to your computer and use it in GitHub Desktop.
def found(tbf,lt):
found=False
for i in range(0,len(lt)+1-len(tbf)):
if lt[i:i+len(tbf)] == tbf:
found = True
return found
inlist = [3,5,6,7,2,1,3,4,1,7,7,7,8,9]
tbf = [1,3,4]
found(tbf, inlist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment