How to use list lacing in Python?

I would like to apply each item of the first list to each item of the second list using python or vice versa. I have only been able to add each item of first list to each item of second list.

There must be a simple way to do this. Please advise.

I forgot to mention that i would like it to read as GF_Level 1, GF_Level 2, GF_Level 3 etc. and the same for the next item in floor list to do the same.

It is easy if you don’t think about lacing in python node (it does’nt exist :wink: )
Simply do a loop for all levels and then a nested loop for all floors
You should read like for each level, do this for each floor…

for l in mylist:
    for f in floor:
        output.append( l  f )
1 Like

Thanks a lot Fabio, It worked. :slight_smile:

you’re welcome.

Switching order of loops will act like the transpose block
switching f and l, will provide you inverted concats :wink:

Actually , i was struggling with understanding the manner of reading the list. I tried several times to understand what it was doing - a loop within a loop. For each item in first list, do the “For each item in second list” . Is that the right way of reading it, cos i cant get my head around it. :slight_smile: Sorry still a newbie.

Try think like an excel spreadsheet:
for all sheets…
for all lines…
for all columns…

you are reading line by line, doing something each column (cell)

Ah, I c, so when i repeat the for loop inside a for loop it applies to the first column of the cell. Out of curiosity, is it possible to do this in excel (it would be so much easier:) ) , i tried, but it doesnt loop one item of one cell to many cells.