[SciPy-User] permutate elements - unique order
Davide
davide.lasagna at polito.it
Mon Feb 14 10:26:50 EST 2011
On 02/14/2011 02:37 PM, Ferdinand wrote:
> hi,
>
> is there a function or an easy way to generate unique sequences of elements?
>
> Like:
>
> function(a,b,c)
>
> output:
>
> a b c
> b c a
> c b a
>
>
>
> (not for example a c b – because a was on the first position already)
>
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
Hi,
Have a look at the itertools module which is in the Python standard
library. There should be enoungh for your purposes.
Cheers,
Davide
More information about the SciPy-User
mailing list