Hello everyone I have a problem with Tkinter. I have an array with arrays inside and buttons. Logically, it should be that when the buttons are pressed, the ID of a particular button should be displayed in the terminal, and the ID of the last one is displayed. How can I fix this? My code: import tkinter master = tkinter.Tk() arr = [[1,"qwe"], [2,"rty"], [3, "uio"]] for i in arr: tkinter.Button(master, text=i[1], command=lambda: print(i[0])).pack() master.mainloop() Continue reading...