from tkinter import *
root = Tk()
root.config(bg = "white")
list = ["a", "b", "c"]
for i in list:
Button(root, text = i,command = i).pack()
root.mainloop()
After running this program, I get the command of every button as "c". But I need each buttons command as each element of list.