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)>
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.