title: Iterating over a dictionary with value as a list
body: <p>I've a dictionary 'mydict'.</p>
  
  <pre><code>{   'a': ['xyz1', 'xyz2'],
      'b': ['xyz3', 'xyz4'],
      'c': ['xyz5'],
      'd': ['xyz6']}
  </code></pre>
  
  <p>I'm trying to print out all the keys and values of this dictionary using the following code:</p>
  
  <pre><code>for username, details in mydict.iteritems():
      pprint.pprint(username + " " + details)
  </code></pre>
  
  <p>But, I'm getting the following error:</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'iteritems'
  </code></pre>
  
  <p>Any help would be appreciated.</p>