Sorry , but Can u change ur input code block please
Use this
Hope u get the idea now
thank you,
Sorry , but Can u change ur input code block please
Use this
Hope u get the idea now
thank you,
@preetesh.magadum Try this:
toNestList = lambda x: x if any(isinstance(i, list) for i in x) else [x]
OUT = []
for i in toNestList(IN[0]):
if i[0]:
OUT.append(i)
else:
OUT.extend(i)
This is my take on it, but I think Amol’s works as well - might be harder for someone to understand who isn’t familiar with lambda functions. I’m also happy whenever I can find a use for List.Map.
flatten.dyn (9.8 KB)
Thank you , Amol & Gavin