fun with shuffle
Posted: Wed Aug 06, 2008 4:58 pm
Shuffle is a boring function. What it does is shuffle around the items in a list randomly.
But one cool use is it can solve one problem that random has. Random repeats itself. So getting random names or quiz questions from a list tend to repeat themselves.
A solution to this is to make a list of those random things and use shuffle on that list then go through that list in order. That way they don't repeat.
But one cool use is it can solve one problem that random has. Random repeats itself. So getting random names or quiz questions from a list tend to repeat themselves.
A solution to this is to make a list of those random things and use shuffle on that list then go through that list in order. That way they don't repeat.