I got a list of sublists, for example in index 4,5,6 I got the coordinates z,y,x and I would like to replace the indexes 4,5,6 by a new item which is a dynamo point composed by those 3 items, that means the 3 indexes removed and the new one added in the original list.
What I got so far is this Python code but it is not looking items inside the sublist, maybe it works with flatten list, not sure
listwithpoint=[]
for xpt,ypt,zpt in zip(list[6],list[5],list[4]):
listwithpoint.append(Point.ByCoordinates(xpt,ypt,zpt))
OUT=listwithpoint
If you’re supplying a list of sublists then (from the code you’ve shown) you’re only grabbing the sublists and not the specified items within each sublist. You need to go one level deeper into your list structure.