title: TypeError: 'int' object is not iterable when trying to reverse a dictionary in python
body: <pre><code>listyList = [1, 5, 7, 9999]
  multiple = [(f, f*100) for f in listyList]
  multipleDict = {f[0]:f[1] for f in multiple}
  
  multipleDict = {v:k for k, v in multipleDict}
  
  print (multipleDict[700])
  </code></pre>
  <p>I am a beginner and tried to reverse a dictionary similar to an example in a tutorial. As far as I can tell I should be iterating through a dictionary and not an int? yet I receive this error when I try to run it</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\User\Desktop\test.py&quot;, line 5, in &lt;module&gt;
      multipleDict = {v:k for k, v in multipleDict}
    File &quot;C:\Users\User\Desktop\test.py&quot;, line 5, in &lt;dictcomp&gt;
      multipleDict = {v:k for k, v in multipleDict}
  TypeError: 'int' object is not iterable
  </code></pre>