title: TypeError: 'type' object is not subscriptable when using lists and classes
body: <p>Here's a sample of what I'm trying to do</p>
  
  <pre><code>class A:
        def xyz(self):
          return n      # Where n is an arbitrary object from a module
  
  class B:
      def abc(self, x): # Where x is an object of class A
        x = x.xyz()     # Where xyz is a method of class A          
  
  
  if list1[n].abc(list2[k]):  # Where n and k are counters in a loop
    pass
  
  </code></pre>
  
  <p>There error I keep encountering is <code>TypeError: 'type' object is not subscriptable</code> and it occurs in the line <code>if list1[n].abc(list2[k]):</code> What does this error mean and how can I resolve it?</p>