[Python] Tkinter button action傳入參數

使用lambda

def btn_action(arg):
    print(arg)
#will print "abc"

btn = Button(master=frame1,command=lambda arg="abc":btn_action(arg=arg))