# How to chop a sublist a variable number of times to variable lengths

hello, how do I chop or slice a list containing lists into a variable number of sublists of variable lengths by indices? I want to be able to slice different sublists at a vairable number of index locations, but not lose any members of the sublist, only create new sub-sublists.

chop by length is the correct method, but you should feed in {2,3,5} instead

Thank you but that is not what i have though. The inputs I have are a list of a lists of indices in actuality. not the lengths. I would need some way to find the different lengths between all the different indicies numbers in a list of lists of varring lengths and I dont know how to do that. My real graph got so messy with me trying to do that that is it pointless to show it here. but i tried everything. Is there some what to do this using python? or perhaps the Loop node?

Ok maybe this will show it better. the list chop I can try to count the Items in the list but it only works if there is one index because I can count the remainder in the parent list and splice the lists together like so, but it does not work in sublists of 2 or more elements because I not only need the remainder but the difference beween all the sequential indices in each sublist which has lengths of various values, So using the get time at index wont work cause I dont know how many elements will be in the list. Can I use the get item at index as a function somehow in this situation maybe? Please advise

I’m confused as to how you’re going from a 2D list to a 4D list.
At that many levels you’re probably better off doing it in Python. It may not even be possible (or maybe just not worth the effort) trying to figure it out with nodes.

i did that because I thought that if someone gave me an answer of how I could chop the list up via indicies in 2D list I could figure it out for the deeper list I was actually working on. Usually when I post what I am actually working on people complain the my script is too messy to follow so I shy away from it now. unfortunately I am not experienced enough in python to pull something like that off.