title: Creating StringVar Variables in a Loop for Tkinter Entry Widgets
body: <p>I have a small script that generates a random number of entry widgets. Each one needs a StringVar() so I can assign text to the widget. How can I create these as part of the loop since I won't know ahead of time as to how many there will be?</p>
  
  <pre><code>from Tkinter import *
  import random
  root = Tk()
  a = StringVar()
  height = random.randrange(0,5)
  width = 1
  
  for i in range(height): #Rows
      value + i = StringVar()
      for j in range(width): #Columns
          b = Entry(root, text="", width=100, textvariable=value+i)
          b.grid(row=i, column=j)
  
  mainloop()
  </code></pre>