Removing empty lists

 

 

 

 

 

 

 

 

Hi

Is there a way to remove empty list from a list? Grasshopper has a ‘clean tree’ component but I can’t seem to find the equivalent in Dynamo. Thanks

 

CleanList

RemoveEmptyLists

Thanks. I though flatten would do the trick but I was using List.Flatten (which obviously didn’t work). Why have two flattens? Whats the difference?

List.Flatten allows you to specify the amount, i.e. the number of hierarchies you want to get rid of:

FlattenVsFlatten