Created
January 13, 2009 18:07
-
-
Save gameame/46541 to your computer and use it in GitHub Desktop.
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
def test_shuffle(n, shuffle): | |
""" | |
Test a shuffle function. | |
""" | |
res = dict() | |
for i in xrange(n): | |
list = ['A', 'B', 'C'] | |
shuffle(list) | |
res[''.join(list)] = res.get(''.join(list), 0) + 1 | |
print res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment