[Tutor] Random list exercise

lists lists at justuber.com
Fri Sep 10 11:23:40 CEST 2010


Ooops, I forgot to send to the list too!

---------- Forwarded message ----------
From: lists <lists at justuber.com>
Date: Fri, Sep 10, 2010 at 10:22 AM
Subject: Re: [Tutor] Random list exercise
To: Christopher King <g.nius.ck at gmail.com>


> you could try random.shuffle and save a lot of time, it takes a mutable
> sequence (like a list) and shuffles it

Hey there,

For the few exercises I've been doing, I think the author has been
attempting to make the reader do things 'the difficult way' so that
the reader understands how things work. Hopefully the next few
chapters will introduce me to doing things the easier way lol :-D

random.shuffle is cool though. I'm really impressed on the sheer
volume of functions that Python provides to make a programmer's life
easier!

Chris


More information about the Tutor mailing list