Sorted list - how to change it

Christophe chris.cavalaria at free.fr
Thu Nov 9 12:49:16 CET 2006


Lad a écrit :
> I have a sorted list for example [1,2,3,4,5] and I would like to change
> it in a random way
> e.g [2,5,3,1,4] or [3,4,1,5,2]  or in any other way except being
> ordered.
> What is the best/easiest
>  way how to do it?
> 
> Thank you for help
> L.
Not accepting that the shuffle outputs the same list as entered would 
make the random less random :)




More information about the Python-list mailing list