# Lists

Hello,
sorry to bother with a maybe easy question, but I really can’t get hold of the solution.

I have 2 lists, for example:

• List
----○ 0 List
---------§ NurbsCrv
----○ 1 List
---------§ NurbsCrv
---------§ NurbsCrv
---------§ NurbsCrv
----○ 2 List
---------§ NurbsCrv

And

• List
----• 1
----• 5
----• 3

Now, how can I make possible that every subIndex curve of the first List has the same Value of the main index of the second list? for example:

• List
----○ 0 List
---------§ 1
----○ 1 List
---------§ 5
---------§ 5
---------§ 5
----○ 2 List
---------§ 3

Sorry for writing the lists as well, but I can’t upload Images.

What do you want to do exactly, which function?

What you descibe is how the replication should work like providing your lists are decently managed.

I have exactly the lists shown, but what I’m trying to achieve is to apply the value of the second list (2,3,4) to the first list.
So in the first result sublist, instead of 3,4 I should get 2,2
In the second sublist I should get 3,3,3,3 and so on.

So every element of my first list, get replaced with the corrisponding value of the main second list

TBH, usually when I see these questions it is a crappy way to use this fabricated list in a function that can be solved by using better list managment instead of rebuiling artificial list structures.

1 Like

Thanks for the solution, I was trying to make a loop with code, but I’m still learning and I got lost somewhere.

I agree with you about the better management of the listing.
My problem here is that I get value from brightness applyied to multiple surfaces.
This generates a simple list of values. In this way i can create a nice pattern of elements to trim with my surfaces.
But all these surfaces have strange tolerances, so when I trim, the curves are not closed and It goes crazy, therefore I have to work with the main list it generates from the intersection, which contains sublists.

But as I said, I’m still learning so it will get better. But Thanks a lot for this solution