title: Tkinter: Addressing Label widget created by for loop
body: <p>The following is my script. Basically, it will ask the user to input a number into the Entry box. Once the user enter a number and click OK, it will give you combination of Labels+Buttons depends on the number that user typed in to the Entry box.</p>
  
  <pre><code>from Tkinter import *
  
  root=Tk()
  
  sizex = 600
  sizey = 400
  posx  = 0
  posy  = 0
  root.wm_geometry("%dx%d+%d+%d" % (sizex, sizey, posx, posy))
  
  def myClick():
      myframe=Frame(root,width=400,height=300,bd=2,relief=GROOVE)
      myframe.place(x=10,y=10)
      x=myvalue.get()
      value=int(x)
      for i in range(value):
          Mylabel=Label(myframe,text=" mytext "+str(i)).place(x=10,y=10+(30*i))
          Button(myframe,text="Accept").place(x=70,y=10+(30*i))
  
  mybutton=Button(root,text="OK",command=myClick)
  mybutton.place(x=420,y=10)
  
  myvalue=Entry(root)
  myvalue.place(x=450,y=10)
  
  root.mainloop()
  </code></pre>
  
  <p>Normally, when i create a label widget, i would do something like this</p>
  
  <pre><code>mylabel=Label(root,text='mylabel')
  mylabel.pack()
  </code></pre>
  
  <p>So when i want to change the text of my label later on i can just simply do this</p>
  
  <pre><code>mylabel.config(text='new text')
  </code></pre>
  
  <p>But now, since i am using for loop to create all labels at once, is there anyway to address the individual labels after the labels has been created?
  For example, the user typed in '5' into the entry box and the program will give me 5 lables + 5 buttons. Is there anyway for me to change the properties (ie, label.config(..)) of the individual labels?</p>