Split list into sublists

Hello all!

I am trying to split a list into 4 branches in python but for some reason I cannot make it work correctly. Could anyone please help me with this.

Thanks in advance!

Does this guide help? https://developer.rhino3d.com/guides/rhinopython/grasshopper-datatrees-and-python/

Datatrees need helpers: import ghpythonlib.treehelpers

Sample code at the bottom of the guide.

This would do the trick:

Python Sublist.gh (8.8 KB)


Thanks a lot for your help!