# Getting Combinations from Varying List Lengths

I have been trying to get nested lists to lace longest to other nested lists. In reality, I’ve got X and Y points and ultimately tried to get it to map to point.bycoordinates. I’m almost certain I’ve tried every possible lacing possibility using code blocks but never get the desired outcome. I need to Keep the List Structure. I’ve represented the output I’m trying to achieve with letters and numbers here:

I’d like to how to get to that output. Should I use List.Map, List.Combinations?

Is this somewhere along the lines you’re thinking?

1 Like

Mate, you’re a genius! I’m not sure how that works but it solves the problem I had. Thanks heaps jostein! That’s been bugging me for months! This is the result I was after:

Nobody knows how replication guides works, even Ian Keough stated at one point that they’re difficult to understand fully! but here’s a little guide anyways: https://github.com/DynamoDS/Dynamo/wiki/Replication-and-Replication-Guide-Part-1

2 Likes

That’s comforting! Thanks again!

Hi josten,
i have an issue like it, i want dynamo to move through the first list and for every item replace it with the proper sublist from list two according to the first item in sublist, if equal to the item in first list replace with it’s sublist.

can i find node to do this ??

Probably should’ve made your request as an seperate subject, but anyways. Maybe Dictionaries can help you? Could be easier ways, just where my mind wandered to at the moment.

2 Likes

Thankss Jostein , its worked fine
but i don’t understand the node of GetKeys, and the code block

Hello,

I am starting with design scrypt. The replication concept is breaking my head!!! I’m going crazy. Can you give me a hand with this please?

I have two lists:

list1 = [ 1_1 , 2_1 , … m_1 ]

list2 = [ [ 1_2 , 2_2 , … n_2 ] , [ 1_3 , 2_3 , … o_3 ] , [ 1_4 , 2_4 , … p_4 ] ]

I want to get a list of rank 2 by joining list1 with each of the lists in list2, that is:

result_list = [ [ 1_1 , 2_1 , … m_1 , 1_2 , 2_2 , … n_2 ] , [ 1_1 , 2_1 , … m_1 , 1_3 , 2_3 , … o_3 ] , [ 1_1 , 2_1 , … m_1 , 1_4 , 2_4 , … p_4] ]

How can I do this in a simple way?

Thanks for help

Hello,

I solved it. But I still don’t fully understand it. I do it by trial and error.