title: AttributeError: 'Checkbutton' object has no attribute 'deselect'
body: <p>I'm having a problem to load the checkbox state from a text file that contain '0' and '1'.</p>
  
  <pre><code>inside "test.txt" file :
  
  1
  0
  1
  0
  </code></pre>
  
  <p>This is what I'm expecting the outcome to be as '1' represent checked box and '0' represent unchecked box</p>
  
  <p><a href="https://i.stack.imgur.com/BOVOi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BOVOi.png" alt="enter image description here"></a></p>
  
  <p>Below is the code I'm working on :</p>
  
  <pre><code>import tkinter as tk
  from tkinter import ttk
  root = tk.Tk()
  root.geometry("180x90")
  name1 = ["Mike", "Harry", "Siti", "Jenn"]
  
  def loadstates():
      f = open("test.txt", "r")
      list_a = []
      list_a = f.readlines()
      return list_a
      f.close()
  
  def createCheckboxes():
      for x, y in zip(st, name1):
          check = ttk.Checkbutton(root, text=y, variable=x)
          if x=='0':
              check.select()
          else:
              check.deselect()
          check.pack(anchor=tk.W)
  
  st = loadstates()
  createCheckboxes()
  root.mainloop()
  </code></pre>
  
  <p>But it gives out error :</p>
  
  <p><em>Traceback (most recent call last):
    File "C:/Users/jmamuham/PycharmProjects/LogBook/load_state.py", line 24, in 
      createCheckboxes()
    File "C:/Users/jmamuham/PycharmProjects/LogBook/load_state.py", line 20, in createCheckboxes
      check.deselect()
  AttributeError: 'Checkbutton' object has no attribute 'deselect'</em></p>
  
  <p>Any idea why .select() and .deselect() gives me this error?</p>
  
  <p>By the way, am I using the correct approach to repopulate the checkbox state using 1 and 0?</p>