unique combinations in python code example
Example 1: how to get all possible combinations in python
all_combinations = [list(zip(each_permutation, list2)) for each_permutation in itertools.permutations(list1, len(list2))]
Example 2: unique combinations in python
from itertools import combinations
[",".join(map(str, comb)) for comb in combinations(L, 3)]