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.
fun with shuffle
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Crying is not a proper retort!