I’m learning now Python for GH since 3 month but get stuck in topic nested Lists. As seen in the picture I have a surface which is divided in U and V and using the given Points in the Python script. I try to shift the nested list everytime for 1 step and then connect the output points with a polyline. But somehow the desired function doesn’t come out . Does anyone has an idea what could be my problem?
Thank you for help. Gh is attached.
import Rhino import Grasshopper.DataTree as ghdt newTree = ghdt[object]() branchN = ptsTree.BranchCount # V - Value itemN = ptsTree.DataCount # all Items U * V itemPerBranch = int(itemN/branchN) # U - Value # convert input data tree to python list of lists listOfLists =  for i in range(branchN): listOfLists.append(ptsTree.Branch(i)) # change on listOfLists data modList =  for i in range(0,len(listOfLists)-1): for j in range(0,itemPerBranch): modList.append(listOfLists[i][j]) a = modList
Shift List.gh (11.4 KB)