Created
August 25, 2014 13:37
-
-
Save GTxx/2796868275375f6bd877 to your computer and use it in GitHub Desktop.
test shuffle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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