title: TypeError: argument of type 'method' is not iterable
body: <p>Error</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/RCS/Desktop/Project/SHM.py", line 435, in &lt;module&gt;
      app = SHM()
    File "C:/Users/RCS/Desktop/Project/SHM.py", line 34, in __init__
      frame = F(container, self)
    File "C:/Users/RCS/Desktop/Project/SHM.py", line 384, in __init__
      if "3202" in q:
  TypeError: argument of type 'method' is not iterable
  </code></pre>
  
  <p>code </p>
  
  <p><strong>some part of code, initialisation and all</strong></p>
  
  <pre><code>while 1:
      q = variable1.get
      if "3202" in q:
          variable2.set("NI NODE3202")
          try:
              switch(labelframe2, labelframe1)
          except:
              switch(labelframe3, labelframe1)
      elif "3212" in q:
          variable2.set("NI NODE3212")
          try:
              switch(labelframe1, labelframe2)
          except:
              switch(labelframe3, labelframe2)
      elif "3214" in q:
          variable2.set("NI NODE3214")
          try:
              switch(labelframe1, labelframe3)
          except:
              switch(labelframe2, labelframe3)
      else:
          None
  </code></pre>
  
  <p><strong>some other part of code</strong></p>
  
  <pre><code>def switch(x, y):
  
      if x.isGridded:
          x.isGridded = False
          x.grid_forget()
          y.isGridded = True
          y.grid(row=0, column=0)
      else: 
          return False
  </code></pre>
  
  <p>I am trying to create a switch between three <code>labelframe</code>s which are inside another <code>labelframe</code>, and outside this <code>labelframe</code> are other <code>labelframe</code>s that are not changing.</p>
  
  <p>I have read some similar answers but I don't want to use <code>__iter__()</code> in my code. Can anybody provide any other suggestions?</p>