Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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