Dynamo node to combine 2 lists alternating values in a new list

#1

Dynamo node to combine 2 lists alternating values in a new list ?
Thank you

0 Likes

#2

multiple answers possible here please show what you are after

0 Likes

#3

example inputs
list1 = [‘f’, ‘o’, ‘o’]
list2 = [‘hello’, ‘world’]

desired output
[‘f’, ‘hello’, ‘o’, ‘world’, ‘o’]

Thank you

0 Likes

#4

List.create -> List.transpose -> list.flatten

image

You could use List.Clean to remove possible “null” results from uneven lists.

0 Likes

#5

Thank you very much !!

0 Likes