permutations - fast & with low memory consumption?
Simon Brunning
simon at brunningonline.net
Tue Dec 19 10:05:35 EST 2006
On 12/19/06, Christian Meesters <meesters at uni-mainz.de> wrote:
> Hi,
>
> I'd like to hack a function which returns all possible permutations as lists
> (or tuples) of two from a given list. So far, I came up with this solution,
> but it turned out to be too slow for the given problem, because the list
> passed ("atomlist") can be some 1e5 items long:
Anything here?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465
--
Cheers,
Simon B
simon at brunningonline.net
More information about the Python-list
mailing list