# What is the relationship between the product function and the concept of permutations with repetitions?

from itertools import permutations,product,combinations_with_replacement colours = [‘r’,’g’,’b’] y = list(product(colours,repeat =2 )) x = list(combinations_with_replacement(colours,2)) print(y) print(x) I understand permutation of a set of objects is an ordering of those objects. When some of those objects are identical, the situation is transformed into permutations with repetition. >Solution : This may provide some insight: colours =… Read More What is the relationship between the product function and the concept of permutations with repetitions?