python - Combinations with replacements -
I know how a combination of a set is generated and it's one in Python (which I use) Built, anyway. How to generate a combination with the replacement?
Suppose I have a set, say, two equal elements - for example, AABCDE .
Combination 3 However, in the program ABC will be counted twice - Once the first A is to be used, and the second A is used The second one to do
What is a good way to generate such combinations without duplicating?
Thank you.
Change it to set
, the easiest way to get rid of duplicates. is.
Comments
Post a Comment