Ghpython index issue

Hi, I was trying to create an up and down pattern. I selected multiple curves and flatterned the curve component. But after I brought them into the ghpython component and appended them into a list, all the curves have the same index 0 instead of 0,1,2,3,4,5.
Please let me know what I was missing there.
Thanks, YL

GHpython_index issue.gh (8.4 KB)
Index issue.3dm (23.5 KB)

Hi,
You need to use crvs = x or crvs.extend(x)
You may also need to set list access on x
Append places the whole list of x inside crvs at index 0 extend adds the items from x to crvs one by one

Thanks for you suggestion. It solved the problem.