shuffling elements of a list

greenflame alikakakhel at yahoo.com
Wed May 31 00:10:06 EDT 2006


Zhang Fan wrote:
> On 30 May 2006 20:18:19 -0700, greenflame <alikakakhel at yahoo.com> wrote:
> > Second of all, I would like to have
> > other methods of shuffling, prefererably riffle shuffling and just
> > plain randomly arranging the elements of the list.
>
> The random module has a `shuffle' method.  It  "Shuffle the sequence x
> in place".
> It may be help for you

I am sorry but this does not help much. In my version of python (2.3)
this method does not seem to exist. Also from the documentation, it
seems that this method would give a random number.




More information about the Python-list mailing list