title: Cant fix Python error AttributeError: 'int' object has no attribute 'get'
body: <p>My source code</p>
  <pre><code>def display_inventory(inventory):
      print(&quot;Itme list&quot;)
      item_total = 0
      for k,v in inventory.items():
          print(str(k) + str(v))
          item_total = item_total + v.get(k,0)
      print(&quot;The total number of items:&quot; + str(item_total))
  
  stuff = {'rope':1, 'torch':6, 'coin':42, 'Shuriken':1, 'arrow':12}
  display_inventory(stuff)
  </code></pre>
  <p>error message</p>
  <pre><code>AttributeError: 'int' object has no attribute 'get'
  </code></pre>
  <p>Could you please tell me how I can fix this error? I'd appreciate if you could also explain why this doesn't work.</p>
  <p>thank you in advance</p>