Вот код
bt1 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(1))
bt2 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(2))
bt3 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(3))
bt4 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(4))
bt5 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(5))
bt6 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(6))
bt7 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(7))
bt8 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(8))
bt9 = Button(root, text=" ", height=3, width=3, command=lambda:OnButtonClick(9))
Я хочу изменить текст кнопки в зависимости от того, какая кнопка нажата, я знаю, возможно ли это с помощью оператора if else, но нет ли эффективного способа сделать это?