title: Iterate over a dictionary using 'for' loop in a class
body: <p>I can't get the return value from <code>find_total()</code> function in <code>DictionaryTest</code> class, when I iterate over <code>channel_list</code> dictionary. Python interpreter gives me this error:</p>
  
  <blockquote>
    <p>TypeError: 'int' object is not iterable</p>
  </blockquote>
  
  <p>What did I do wrong in the code?</p>
  
  <pre><code>class DictionaryTest:
      def __init__(self, dictionary):
          self.dictionary = dictionary
  
      def find_total(self):
          total = 0
          for channel_num, channel_det in self.dictionary:
              total += channel_det['charge']
          return total
  
  
  channel_list = {1: {'name': 'Sony PIX', 'charge': 3}, 
                  2: {'name': 'Nat Geo Wild', 'charge': 6}, 
                  3: {'name': 'Sony SET', 'charge': 3},
                  4: {'name': 'HBO - Signature', 'charge': 25}}
  
  user_2 = DictionaryTest(channel_list)
  print(user_2.find_total())
  </code></pre>