Get Start and end number, how?

Hello Dynos,

i already posted in months ago i can´t find it…

so i have a list i want to get pairs:


how does it work? shift indexes?

KR

Andreas

Hi @Draxl_Andreas

here you can use a loop to create these pairs.

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

input_list = IN[0]

OUT = [[input_list[i], input_list[i+1]] for i in range(len(input_list)-1)]
2 Likes

You could use the following nodes to get a similar output to the python node indicated above

4 Likes

Use List.Sublists :slight_smile:

1 Like

To expand on this answer: Dynamo Dictionary