# How to check which Button was clicked in Tkinter  in Python # Python program to determine which# button was pressed in tkinter  # Import the library tkinterfrom tkinter import *  # Create a GUI appapp = Tk()  # Create a function with one paramter, i.e., of # the text you want to show when button is clickeddef which_button(button_press):    # Printing the text when a button is clicked    print(button_press)    # Creating and displaying of button b1b1 = Button(app, text="Apple",            command=lambda m="It is an apple": which_button(m))  b1.grid(padx=10, pady=10)  # Creating and displaying of button b2b2 = Button(app, text="Banana",            command=lambda m="It is a banana": which_button(m))b2.grid(padx=10, pady=10)  # Make the infinite loop for displaying the appapp.mainloop()