Operations on sublists, generate list of results

I am trying to get the average of each sublist and create a separate list out of all of the results. What I’m struggling with is getting it to iterate through each of the 6 sublists. Is “LoopWhile” going to be required? I’ve been playing around with it, but I’m having trouble seeing how.

There are very few useful examples of LoopWhile that I can find. The Dynamo dictionary example is not much more than a sequence. I don’t want to use the actual index numbers of the sublists in the math operations, just cycle through the sublists and perform the operations on each.

(The number of sublists–and therefore iterations–will vary depending on the selection.)

The Average node will take care of the sublists. The node already requires a list as an input, so it will automatically iterate through each sublist.

Loops are only used for very specific circumstances in Dynamo. Instead, you just modify the list levels or lacing of a node to have it iterate across lists or sublists.

1 Like

Awesome, that one node replaced about a dozen that I was using to do all the math, in addition to iterating through all of the sublists.