Created
June 13, 2020 11:22
-
-
Save chuongmep/f38b79da26b20b0ba5de5f2246a57d06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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