This is my list:
biglist = [ {'title':'U2','link':'u2.com'}, {'title':'beatles','link':'beatles.com'} ]
print random.shuffle(biglist)
that doesn't work! It returns none.
This is my list:
biglist = [ {'title':'U2','link':'u2.com'}, {'title':'beatles','link':'beatles.com'} ]
print random.shuffle(biglist)
that doesn't work! It returns none.
random.shuffle
shuffles the list, it does not return a new list. So checkbiglist
, not the result ofrandom.shuffle
.Documentation for the
random
module: http://docs.python.org/library/random.html