Re: [Tutor] Lists of lists - different sized lists

2006-05-19 Thread Kent Johnson
Adam Cripps wrote: > I'm trying to sort [1] a list of people randomly into groups. My guess > is that a list of lists will do the trick here. However, the randrange > fails with an empty range. How can I check for this? I thought that my > pupils list wouldn't reach zero with the while len(pupils)>

[Tutor] Lists of lists - different sized lists

2006-05-19 Thread Adam Cripps
I'm trying to sort [1] a list of people randomly into groups. My guess is that a list of lists will do the trick here. However, the randrange fails with an empty range. How can I check for this? I thought that my pupils list wouldn't reach zero with the while len(pupils)>0: would keep it above 0.