Hi,

I have multiple lists (say ‘n’ number of lists) containing 5 elements each. I want to create unique combinations in a specific pattern as stated in below example. Let’s say i get 3 lists as below.

x = [1,2,3,4,5]

y = [6,17,8,9,10]

z = [11,14,1,16,7]

The combination i’m looking for is that every element of one list should be combined with the last element of the other lists. So, the outcome of the above would be:

unique_combined_lists = [(1,10,7), (2,10,7), (3,10,7), (4,10,7), **(5,10,7)**,

(5,6,7), (5,17,7), (5,8,7), (5,9,7), **(5,10,7)**,

(5,10,11), (5,10,14), (5,10,1), (5,10,16), **(5,10,7)**]

**(5,10,7)** should be displayed only once (hence, unique combinations).

Can someone please help? Thanks in advance