title: How can i add checkbuttons so they can print in a scale 2:1 depending on the lenght of an array containing the list of items i want to create?
body: <p>The task is to make an array that contains list of items which are type string and to create checkbuttons for them but they have to be in a scale 2:1.<br />
  What this means is if i have a list, example:</p>
  <pre><code>list = [&quot;London&quot;,&quot;Paris&quot;,&quot;Lisbon&quot;,&quot;Vienna&quot;,&quot;Toronto&quot;,&quot;California&quot;,&quot;LA&quot;,&quot;NYC&quot;]
  </code></pre>
  <p>For a given list table would be 4 rows(3 rows if indexing goes from 0) and 2 columns(1 column if indexing goes from 0).<br />
  I was able to make a code which only adds two columns and infinite number of rows.
  My piece of code:</p>
  <pre><code>j = 0
  x = 0
  y = 0 
  for j in range(len(Array)):
      items = tkinter.Checkbutton(window, text=Array[j], onvalue=1, offvalue=0=) 
      Array.append(items)
      items.grid(row=x, column=y, sticky=W)
      if j == len(Array)//2-1:
          x = 0
          y =y+ 1
      else:
          x =x+ 1
  </code></pre>
  <p>Note:<br />
  What if number of items in array is odd? What would the scale be and how would they add through checkbuttons?<br />
  Example:<br />
  7 numbers in the array, scale would be 7:?</p>
  <p>Example of a scale 2:1, O-s will represent items:</p>
  <pre><code>O O
  O O
  O O 
  O O
  </code></pre>