python – I dont know to how to change colour of buttons inside dictionary


I wrote a program with Tkinter and stored my buttons created using a loop in a dictionary Button_dict but I don’t know to how to change their color on click
the code I wrote

Button_dict={}
def gettkt():
    global Button_dict
    def changecolour(seatname):
        selected_tkts=0
        if (Button_dict(seatname))('bg')=='white':
            (Button_dict(seatname))('bg')='green'
        else:
            (Button_dict(seatname))('bg')='white'
    nooftkt=simpledialog.askinteger(title='Tickets',prompt='Number of tickets:')
    global nooftkt_int
    nooftkt_int=nooftkt
    print(nooftkt_int)
    ticketwindow=Tk()
    ticketwindow.geometry('600x600')
    for j in range(ord('A'),ord('G')):
        for i in range(1,8):
            seatname=str(chr(j)+str(i))
            Button_dict(seatname)=Button(ticketwindow,text=seatname,command=lambda:changecolour(Button_dict(seatname)),bg='white').grid(row=j,column=i)