Skip to content

Instantly share code, notes, and snippets.

@GTxx
Created August 25, 2014 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GTxx/2796868275375f6bd877 to your computer and use it in GitHub Desktop.
Save GTxx/2796868275375f6bd877 to your computer and use it in GitHub Desktop.
test shuffle
from random import shuffle
position_num = dict([(i, dict([(j, 0) for j in range(10)])) for i in range(10)])
for i in range(1000):
l = list(range(10))
shuffle(l)
for index, j in enumerate(l):
position_num[j][index] += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment