I have a list of objects and I want to shuffle them. I thought I could use the random.shuffle method, but this seems to fail when the list is of objects. Is the
random.shuffle
>>> import random >>> a = ['hi','world','cat','dog'] >>> random.shuffle(a,random.random) >>> a ['hi', 'cat', 'dog', 'world']
It works fine for me. Make sure to set the random method.