simple recursion help

Thorsten Kampe thorsten at thorstenkampe.de
Sun Nov 14 09:39:01 EST 2004


* Steven Bethard (2004-10-23 21:56 +0100)
> drs <drs <at> remove-to-send-mail-ecpsoftware.com> writes:
>> I am looking for a list of all unique strings of length x whose
>> elements are from the set a, b, and c.
> 
> Does anyone know what this operation is called?

"variation with repetition"
(or the "cartesian product": ['a', 'b', 'c'] ** 3)

> It's not permutations or combinations as I understand them since
> permutations and combinations do not allow repetition.

Both of them do allow (because there are two kinds - with and without
repetition - for both of them) (see my other reply in the thread).

Thorsten



More information about the Python-list mailing list