Removing empty lists


#1

 

 

 

 

 

 

 

 

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


#2

RemoveEmptyLists


#3

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?


#4

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

FlattenVsFlatten