tkinter create labels and entrys dynamically
<p>Hello guys i need some ideas for my python script.</p>

<p>i want to create a simple gui where i can enter some values. a label before and at the and an button to start the script.</p>

<p>i was using something like this:</p>

<pre><code>w = Label(master, text="weight:")
w.grid(sticky=E)
w = Label(root, text="bodyfathydrationmuscle:bones")
w.grid(sticky=E)
w = Label(root, text="hydration:")
w.grid(sticky=E)
</code></pre>

<p>its ok but i want to do it dynamic. also when i would use w for all the entrys i only could cast w.get once. but i need all my data ;-)</p>

<p>i was thinking of:</p>

<pre><code>  def create_widgets(self):
    L=["weight","bodyfat","hydration","muscle","bones"]
    LV=[]
    for index in range(len(L)):
        print(index)
        print(L[index])
        ("Entry"+L[index])= Entry(root)
        ("Entry"+L[index]).grid(sticky=E)
        ("Label"+L[index])=Label(root, text=L[index])
        ("Label"+L[index]).grid(row=index, column=1)
</code></pre>

<p>To call later:
var_weight=Entryweight.get()
var_bodyfat=Entrybodyfat.get()</p>

<p>and so on. how can i make it work?</p>
