title: Creating Multiple Checkboxes in tkinter
body: <p>I'm trying to create 3 sets of checkbox lists of varying lengths and then display them in three columns on a page within a tkinter GUI. List 1 will be a Integer based list, 2 &amp; 3 are Strings. The variables for the names of these lists are defined earlier in the code before the GUI starts.
  <code>N_index = [1, 2, 3]</code>
  <code>T_index = [T1, T2, T3]</code>
  <code>P_index = [P1, P2, P3]</code></p>
  
  <p>The lengths of the lists will change each time the code is run so I have used this:</p>
  
  <p><code>N_leng = range(1, int(len(N_index)+1))</code>
  <code>T_leng = range(1, int(len(T_index)+1))</code>
  <code>P_leng = range(1, int(len(P_index)+1))</code></p>
  
  <p>The code I have partially used to create my GUI is taken from here <a href="https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter">Switch between two frames in tkinter</a> (Thank-you)</p>
  
  <p>I'm trying to put these lists into Page One.</p>
  
  <pre><code>class PageOne(tk.Frame):
  
      def __init__(self, parent, controller):
          tk.Frame.__init__(self, parent)
          f = tk.Frame(self)
          f.pack(side="left")
  
          label = ttk.Label(f, text="Page One", font=LARGE_FONT)
          label.pack(pady=10, padx=10)
  </code></pre>
  
  <p>I then have the 3 sets of checkboxes. When I run the code it runs and never finishes. However it doesn't throw up an error even in debugging mode. Can someone spot my mistake?</p>
  
  <pre><code>    def ckbox_params():
          for i, j in zip(N_index, N_leng):
              ivar = tk.IntVar()
              N_selection1 = tk.Checkbutton(f, text="%d" % i, variable=ivar, onvalue=i, offvalue="")
              N_selection1.grid(sticky="nw", pady=4)
  
          for i, k in zip(T_index, T_leng):
              svar = tk.StringVar()
              T_selection1 = tk.Checkbutton(f, text="%s" % i, variable=svar, onvalue=i, offvalue="")
              T_selection1.grid(sticky="nw", pady=4)
  
          for i, l in zip(P_index, P_leng):
              svar = tk.StringVar()
              P_selection1 = tk.Checkbutton(f, text="%s" % i, variable=svar, onvalue=i, offvalue="")
              P_selection1.grid(sticky="nw", pady=4)
      ckbox_params()`
  </code></pre>
  
  <p>Any suggestions, ideas or solutions would be helpful as to what I've done wrong.</p>
  
  <p>Thank you</p>