List with sublist and the previous and next sublist

I am trying to create a list with three list, 0,1,2 List //1,2,3 List//2,3,4 List//… I mean the list, the previous and the next list.
Anybody could help me?

This but in automatically way to all the sublists

Look at the List@Level paragraph in this part of the Dynamo Primer.

1 Like

Thanks a lot Marcel. Maybe i don´t explain well, my problem is not select the item in differents levels, if not is make list of three components with the item and the previous-next item. I don´t know how to make it for all the items. In the image, i want to make a list with the 0List-1List-2 List, other with 1List-2List-3List,…
Maybe with List.ShiftIndices…i am going to try it.

I don´t know if it is the best way but it works.

Think this is what you mean. I drop the First&last because there is no -1 index for the first item and no +1 index for the last item.

@FRAN1972 I think List.Sublists would be a neat solution.

You can drop the first & last list as suggested by @Bjorn_Keulemans1 if required.