I'm making a project which requires me to make 270 buttons in tkinter, I'm creating them via a loop and i need to add functionality to them. In order for them to be functional for my purpose I need to find out which button is being pressed how do i do this?
heres my code (dont worry about the loads of comments, its necessary as its for a project for my exams)
The blue part is where the buttons are created. Thanks
I've really not tried anything, I've tried to get the text of the button's as this will be actually what I want. The buttons are named after all the London Underground stations and so getting the text of the button will be sufficient. I just dont rlly know what I'm doing