Skip to content

Instantly share code, notes, and snippets.

@vvoody
Created July 25, 2010 15:33
Show Gist options
  • Save vvoody/489641 to your computer and use it in GitHub Desktop.
Save vvoody/489641 to your computer and use it in GitHub Desktop.
import random
a = []
def bingo(n):
b = []
while len(b) < n:
s = random.randint(0,120)
if s in a:
continue
b.append(s)
a.append(s)
return b
# 抽奖程序,print bingo(N)选出N为获奖者
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment