[Tutor] 15 puzzle

Rick Pasotto rick@niof.net
Wed, 9 May 2001 11:00:49 -0400


On Wed, May 09, 2001 at 01:16:14PM +0100, alan.gauld@bt.com wrote:
> Remco wrote:
> 
> > Use random.shuffle, i.e.
> >
> > import random
> > buttons = range(15)
> > random.shuffle(buttons)
> 
> One of the things I love about Python is that I keep discoovering 
> new neat features. :-)
> 
> One of the things that I hate about Python is I usually discover those 
> features *after* I've already reinvented the wheel :-(

random.shuffle() is new. It was not in 1.5.2.

When it is suggested that a new feature be used, it might be a good idea
to mention the fact that it's a new feature. Or is 1.5.2 considered to
be so old now that no one should be using it?

-- 
Thus, there is not a single ill afflicting the nation for which
the government has not voluntarily made itself responsible. Is it
astonishing, then, that each little twinge should be a cause of
revolution?
	-- Frédéric Bastiat (1801-1850)
    Rick Pasotto    rickp@telocity.com    http://www.niof.net