From: "Mauricio Fernández" Date: 2005-12-06T22:34:46+09:00 Subject: Re: Shuffling an array, sort_by{rand}'s bias (was Re: need some Ruby On Tue, Dec 06, 2005 at 07:32:34PM +0900, Uwe Schmitt wrote: > Hi, I'm new to ruby, but I use Python for some years now. > So I suggest the following 'pythonic' solution ;-) [...] > Is there a shorter or more elegant way to do this > 'decorate-sort-undecorate' in ruby ? arr.sort_by{rand} > In Python it is quite easy by using list comprehensions... What does that look like in Python? Is it shorter than the above one? }:-) -- Mauricio Fernandez