Hey.
I know how to generate combinations of a set and that's a builtin in Python (what I use), anyway. But how to generate combinations with replacements?
Suppose I have a set with, say, two identical elements - for example, "AABCDE".
Combinations of 3 items could be:
"AAB" "ABC" "CDE"
However, the program would count 'ABC' twice - once when using the first A, and the second one using the second A.
What is a good way to generate such combinations without duplicates?
Thanks