myButtons = [
"E", "CE", "C", "/", "%",
"7", "8", "9", "*", "x²",
"4", "5", "6", "-", "√",
"1", "2", "3", "+", "^",
"0", ".", "+/-", "!", "="
]
for i in myButtons:
for j in range(0,4):
for k in range(0,4):
tkinter.Button(window, text=i,bg="blue", width=10, height=3, command=echo(i)).grid(row=j, column=k)
Can't cycle array elements into buttons, i expected buttons with value from array, but got last element as value of many buttons. Why it is happening?