Dispatching half a variable data list

Hi there! I’m quite new to Grasshopper and this may be a simple question.

I have a data list that varies depending on parameters. I eventually want to weave List A and List B, so if there is a more efficient way of doing this please let me know. Is there a way to set a dispatch pattern for half the list?

Input A
Data list: 1, 2, 3, 4, 5, 6, 7

Desired Output A
List A: 0, 1, 2, 3
List B: 4, 5, 6, 7

However, I don’t want it to be a static pattern. I want it to change so if the inputted data list changed to more/less values, the dispatch pattern would still distinguish half the list.

Input B
Data List: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Desired Output B
List A: 0, 1, 2, 3, 4, 5, 6, 7
List B: 8, 10, 11, 12, 13, 14, 15

Thank you!!

List length with X/2 in the expression and partition list should do it

1 Like

This might help…

1 Like

Thank you so much! This worked just as I wanted it to.

Thank you!