promotion image of download ymail app

Python iterable function?

list = ['a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b']

Using Python, how can I make an iterable program such that instead of using perm = itertools.permutations(list) which would create a lot of repeats (10!=3,628,800 results and 3,628,590 duplicates), how can I bypass creating a 10! list, giving my computer a migraine, and shorten this to no repeats, (10 choose 6)=210 results?

There are no answers yet.
Be the first to answer this question.