解决这个问题的技巧是使用一个假的默认参数。 for i in array: tk.Button(root, text=i, command=lambda i=i:print_when_clicked(i)).pack ...
確定! 回上一頁