I am trying to get values from a Tkinter Entry()
widget, but it returns that str() has no attribute get()
:
import tkinter
from tkinter import *
root=Tk()
flag=0
a={'x','y','z'} # Consider these as columns in database
for i in a:
i=Entry(root)
i.pack()
def getter():
for i in a:
b=i.get() # i is read as string and not as variable
print(b)
asdf=Button(root,text='Enter',command=getter)
asdf.pack()
root.mainloop()