title: How to get the state of a Checkbutton in python?
body: <p>I am working on my school project and I am stuck with one thing that is how to get the states of the checkbuttons. I used for loop to create the checkbuttons as there are many checkbuttons. I just don't know how to get the state of the checkbuttons.</p>
  <p>Here <code>'entry1'</code> refers to a list which is needed to input by the user and <code>active_state</code> will store the active state of the checkbuttons.</p>
  <pre><code>        active_state=[]
          for i in range (0,len(entry1)):
                      var=IntVar()    
                      check_btn=ttk.Checkbutton(update_record_window,text=entry1[i])
                      check_btn.grid(column=0,row=1+i)
                      active_state.append(var)
          print(active_state)
  </code></pre>
  <p>Please if anybody can tell me what I am doing wrong, it would be very grateful of you. Thanks in advance for the help.</p>