Skip to content

Instantly share code, notes, and snippets.

@cmtsij
Created Oct 20, 2016
Embed
What would you like to do?
Taiwan lottery
#!/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