I used for loop to render 15 buttons, and each button invokes the same function to do something. My question is how to determine which button is clicked? My code snippet is like below:
for number in range(1, 16):
ttk.Button(bottom_frame, text='Read', command=read_one).grid(column=4, row=number, padx=5, pady=5)
I want to reuse the function read_one() for every button, but don't know how to determine which button is clicked. Any comment is appreciated! Here's my test code: https://pastebin.com/fWyyNVw7