ok_button button(text'ok 'to get the button to do something when clickeduse the command argument it is set to the name of functioncalled callback function when the button is clickedthe callback function is called here is an examplefrom tkinter import def callback()label configure(text'button clicked 'root tk(label label(text'not clicked 'button button(text'click me 'command=callbacklabel grid(row= column= button grid(row= column= mainloop(when the program startsthe label says click me when the button is clickedthe callback function callback is calledwhich changes the label to say button clicked lambda trick sometimes we will want to pass information to the callback functionlike if we have several buttons that use the same callback function and we want to give the function information about which button is being clicked here is an example where we create buttonsone for each letter of the alphabet rather than use separate button(statements and different functionswe use list and one function from tkinter import alphabet 'abcdefghijklmnopqrstuvwxyz def callback( )label configure(text'button {clicked format(alphabet[ ])root tk(label label(label grid(row= column= columnspan= buttons [ ]* create list to hold buttons for in range( )buttons[ibutton(text=alphabet[ ]command lambda =icallback( )