Complex list multiplication


I have two lists that i would like to combine in a cross product kind of way, let me explain:

as shown in the picture i have two lists with a X and Y value. I want all X 0-list values to be added cross product with all Z 0-list items But not with 1-list items. So:

X1, Z1
X1, Z2
X1, Z3
X2, Z1
X2, Z2
X2, Z3
X3, Z1
and so on…

So, if you’re good with lists, please help me! :slight_smile:

Kind regards,



convert them to String


thank you, but the only thing that does is letting me combine X1 and Z1, X2 and Z2. That’s not my problem. the thing i would like to achieve is a cross product combination of all sublists. So 5x5=25 combinations per sublist. if i flatten the list and cross product them i end up with 90*90=8100 items because it combines all values…