help with code for combinations/permutations
Darren New
dnew at san.rr.com
Wed Jan 17 12:38:37 EST 2001
Another way of doing this is to recognise that if you have all the
permutations of (1,2,3), you can get all the permutations of (1,2,3,4) by
inserting a "4" in each possible point in the permutations you already have.
In other words, it's almost trivial to reduce recursively.
Oh, and it's a 1-liner in APL. ;-)
Bryan Webb wrote:
> I need to come up with all possible combinations of the numbers in the above
> list ie.
--
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST). Cryptokeys on demand.
"It says this wine has syphilis."
"I think that's pronounced `sulphates'."
More information about the Python-list
mailing list