乱数を使うことがあったので暇つぶしにビンゴマシーンを作ってみました。
import tkinter as tk
import numpy as np
import bisect
bingo = list(range(1,76))
gets = []
def bingoo():
get = np.random.choice(bingo)
bisect.insort_left(gets,get)
s= "最新番号: {0} ".format(get)
labelResult['text'] = s
m = "今までの数 {0} ".format(gets)
labelLesult['text'] = m
bingo.remove(get)
if len(bingo) ==0:
s = "終了"
labelResult['text'] = s
win = tk.Tk()
win.title("ビンゴ")
win.geometry("500x250")
labelResult = tk.Label(win, text=u'---',font=("",50))
labelResult.pack()
labelLesult = tk.Label(win, text=u'---')
labelLesult.pack()
calcButton = tk.Button(win, text=u'次の数は・・・')
calcButton["command"] = bingoo
calcButton.pack()
win.mainloop()