I'm trying to write some code which allows me to press a button, then the background of that button will change. the code I've written only changes the colour of the final button when any of the other buttons are pressed. can someone help me resolve this?
import tkinter as tk
column = 0
def click_me():
button.configure(bg='red')
for i in range(10):
button = tk.Button(text="___", font='Fixedsys 20 bold', command=click_me)
button.grid(column=column, row=0)
column += 1