Created
October 20, 2016 13:24
-
-
Save cmtsij/c820652962f925e88cd1c6bb3cd1438b to your computer and use it in GitHub Desktop.
Taiwan lottery
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
#!/usr/bin/env python | |
import random | |
l=range(1,1+49) | |
random.shuffle(l) | |
# extend 5 numbers. (49->54) | |
l.extend(random.sample(l[0:48],5)) | |
# display | |
for i in xrange(9): | |
x=l[6*i:6*i+6] | |
x.sort() | |
print x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment