Separate Nested List by Number of Items

I’m racking my brain trying to figure this one out. When I have a nested list with a structure like this one for instance where i Have sub lists with 4 and 3 items. How do I separate them into two lists, each containing only sub lists with 4 or 3 items?

Fortunately I had saved this file from your other post @h.hristov31 so this is was quick to do. :wink: If I’m understanding correctly you need to use List.Chop. Here I combined it with the Count node and divided it by 2 but you may want to input your length for List.Chop differently depending on what your goal is for dividing the lists.

1 Like

@awilliams That’s twice now that you’ve saved me. Really can’t thank you enough!

1 Like

No problem! I am curious to see what your final product with this workflow is :slightly_smiling_face:

I intended to use it for populating custom revit mass patterns with adaptive components when I asked, but I can see it being useful for a variety of situations. My current final product is actually complete but literally half of it works and I am completely flabbergasted by it. Here it is if you’re interested Kinetic Panels and Sun Path Issue