执行以下Python Tkinter代码,点击按钮时会发生什么?
import tkinter as tk
def on_button_click():
print("Button clicked!")
root = tk.Tk()
button = tk.Button(root, text="Click me!", command=on_button_click)
button.pack()
root.mainloop()
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析