Is there an iterator in Python that gives the product but omits permutations of the classes itself?
Assume that I want to assign a color to 5 different balls and have 3 colors r,b and g. I would like to iterate over all these combinations. Preferably I would want to omit combinations that are equal up to permutation of the color classes. That means for example that I want to consider (r,b,b,b,b) and (g,r,r,r,r) as equal.
I could use