A little sample code I put together for a friend who was looking at doing something similar...card shuffle algorithm in Python.
Take an array and swap each position in sequence with a randomly chosen position. In the end you get the same set of items but in a random order.