Marci
May 22, 2023, 5:30am
1
Hello everyone,
how to filter sublist that contains another sublist in a proper order? Elements can only be before and after.
Thanks in advance.
@Marci ,
try using boolean operators is list in list…
Boolean operators are words and symbols, such as AND or NOT, that let you expand or narrow your search parameters when using a database or search engine.
Est. reading time: 5 minutes
KR
Andreas
Hello, there is definitely a better way, here is one
python script
Rank=IN[1]
Lists=IN[0]
container=[]
for i,j in zip(Rank,Lists):
if i==1:
container.append(j)
else:
for k in range(0,len(j)):
container.append(j[k])
OUT = container
cordially
christian.stan
Marci
May 23, 2023, 5:09am
4
Hello @christian.stan ,
thanks for the help, this would be the expected result, maybe now it’s more understandable.
Hello, I thought the order mattered in your first post.
Cordially
christian.stan