Để biết nút nào được nhấn, dùng callback function trong Button config, in tham số truyền vào.
Ví dụ
# Import thư viện
from tkinter import *
from tkinter import ttk
# Tạo khung
win = Tk()
win.geometry("700x250")
# Hàm lấy info nút
def get_button(t):
print(t)
# Tạo 2 nút
b1 = ttk.Button(win, text="Button-1", command=lambda t="Button-1 Clicked": get_button(t))
b1.place(relx=.46, rely=.5, anchor=CENTER)
b2 = ttk.Button(win, text="Button-2", command=lambda t="Button-2 Clicked": get_button(t))
b2.place(relx=.58, rely=.5, anchor=CENTER)
win.mainloop()Kết quả
Hai nút. Click Button-1 in "Button-1 Clicked".

Button-1 Clicked