Dynamo - Emplty list flatten into 2 lists

Hi everyone,

I got a problemwith Dynamo, I don’t think it’s normal. I have a list with 2 lines empty. I need to flatten it and i get… 2 items! Is it normal? Do you know how can I resolve this? At this time, i delete one item manualy…


It seems to be a list consisting of an empty list, you could use a List.Clean to remove all empty lists from the list.
after that, you could use flatten.


Good luck =)

I am not sure if you have noticed the levels. Your 2 empty lines are actually two Empty lists in @L2 and you are flatting just the level 3 (to say it in a way). That is why you get to items, to empty lists.

1 Like

My list 2 has 2 empty lists but I thought that flaten will delete one dimension of my list, so my list 2 will stay 1 empty list… It’s not flaten that I must use?

I suceed like that, but it’s a little bit complicated for what I want…

Flatten removes a level. An empty list in level 2 is also empty in level 1, but this level still exists in the list structure.

How do you want your list to look like?

I suggest u not to use the List.Flatten node but simply Flatten. Then u can play with the little @ (picture) to adjust the level you want to flatten. Make the @ appear clicking on the little arrow just next to the entry connection


Does it solve ur problem ?

1 Like