Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created June 13, 2020 11:22
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 chuongmep/f38b79da26b20b0ba5de5f2246a57d06 to your computer and use it in GitHub Desktop.
Save chuongmep/f38b79da26b20b0ba5de5f2246a57d06 to your computer and use it in GitHub Desktop.
#Copyright(c) 2020, chuongho
# @chuongmep, https://chuongmep.com/
data = IN[0]
item = IN[1]
newlst = []
i=0
for n in item:
i = i+1
try:
lst = data[data.index(n):data.index(item[i])]
newlst.append(lst)
except:
lst = data[data.index(n):-1]
newlst.append(lst)
OUT = newlst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment