I wants to make a program with multiple tkinter Entry widgets. I use a for loop to make multiple Entry widgets. But how can I get the value from it?
My test code:
from tkinter import *
root=Tk()
variables = []
entries = []
for i in range(10):
va = StringVar()
en = Entry(root, textvariable=va)
en.grid(row=i+1, column=0)
variables.append(va)
entries.append(en)
def hallo():
print(en.get())
button=Button(root,text="krijg",command=hallo).grid(row=12,column=0)
root.mainloop()