Generating all combinations
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Mon Jun 1 19:40:33 EDT 2009
On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote:
> I believe the name you're looking for is combinations_with_replacement.
> It is one of the features being added to 3.1 which should give all the
> subsets of the Cartesian Product:
>
> permutations_with_replacement: product()
> combinations_with_replacement: combinations_with_replacement()
> permutations_without_replacement: permutations()
> combinations_without_replacement: combinations()
What, no partitions?
http://en.wikipedia.org/wiki/Partition_of_a_set
--
Steven
More information about the Python-list
mailing list