title: Why there is a TypeError: 'str' object cannot be interpreted as an integer?
body: <p>I am doing a practice of OrderedDict. I am trying to assign value to dictionary by using input().rsplit method. There is an error occurred called:"TypeError: 'str' object cannot be interpreted as an integer". Where did I get wrong?</p>
  
  <pre class="lang-py prettyprint-override"><code>from collections import OrderedDict
  num=input()
  itemlist=OrderedDict()
  for i in range(num):
      itemName,itemPrice=input().rsplit(' ',1)
      if itemName in itemlist:
          itemlist[itemName] += int(itemPrice)
      else:
          itemlist[itemName] = int(itemPrice)
  for name, price in itemlist.items():
      print str(name), str(price)
  </code></pre>
  
  <p>I expect to store user's input to the dictionary like 'BANANA FRIES 12'</p>
  
  <p>Here is the example of OrderedDict </p>
  
  <pre><code>ordered_dictionary = OrderedDict()
  &gt;&gt;&gt; ordered_dictionary['a'] = 1
  &gt;&gt;&gt; ordered_dictionary['b'] = 2
  &gt;&gt;&gt; ordered_dictionary['c'] = 3
  &gt;&gt;&gt; ordered_dictionary['d'] = 4
  &gt;&gt;&gt; ordered_dictionary['e'] = 5
  &gt;&gt;&gt; 
  &gt;&gt;&gt; print ordered_dictionary
  OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)])
  </code></pre>
  
  <p>This error seems to tell me cannot assign itemPrice to itemlist[itemName]...I don't know why </p>