📜  如何在 python 代码示例中编写可点击按钮

📅  最后修改于: 2022-03-11 14:45:27.806000             🧑  作者: Mango

代码示例1
from tkinter import *
master = Tk()
def close_window():
    exit()
button = Button(master, text = 'Click me', command = close_window)
button.pack()
mainloop()