How to combine two lists of strings

Hello,

I am trying to combine two lists of strings to create one list but corresponding indexes at each row match up. So for example the 0 item is combined with the 0 item on the other list. However, I would like it so the item from the second list is on the line below the item from the first list. I have added a screenshot of what I have so far.

The main format I am looking for in reference to strings in the lists would look like:

100/150 SF
1 OCC.

200/150 SF
2 OCC.

300,150 SF
3 OCC.

and so on…

Any help is greatly appreciated and thank you in advance

@Clayton.Woollen_UVKH ,

for that you can use zip function

string_one = IN[0]
string_two = IN[1]

OUT = zip(string_one,string_two)

KR

Andreas

3 Likes

Hi, don’t hesitate to consult this reference document


too fast Mr draxl :wink:
(100..600..100)+""+"/150SF"+"\n"+(1..6)+" OCC.";
Sincerely
christian.stan

1 Like

hello,

Thank you for this, this is the format I want but how would i implement this without using a code block? The items in the two lists I will be using will constantly change so if there is a way to use a node with inputs that would be ideal.

Thanks again for your help

1 Like


block codes can be replaced by number and string depending on the case
cordially
christian.stan

Exactly what I was looking for. Thank you so much!

1 Like