I am developing an app with tkinter and I have the following code:
tricks = ['Always Three', 'bhu']
def trickInstructions(selectedTrick):
print(selectedTrick)
def menu():
for trick in tricks:
Button(root, text = trick, pady=1, command = lambda: trickInstructions(self.name)).pack(side=BOTTOM)
I would like to send the name of the button to the trickInstructions()
function everytime the button is clicked.
Is this possible and how?