My first Python don`t work with list. Why?

This is my first Python script.
It works fine with one element but don’t work with list.
Could someone explain how to fix it?

import clr
clr.AddReference(‘ProtoGeometry’)
import math
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
X=IN[0]
D=IN[1]

R=round(X,D)

#Assign your output to the OUT variable.
OUT = R

To work on lists you need to use the “for” and “in” constructors which you can look at the following examples for how this is used.

https://developers.google.com/edu/python/lists

1 Like

Thank You