title: How to make a dictionary from raw data string
body: <p>Essentially I need to create a dictionary from a string of data</p>
  
  <p>Given :</p>
  
  <pre><code>data = "electron1, gamma5, proton43, boson98, ..."
  </code></pre>
  
  <p><code>d(data)</code> would result in:</p>
  
  <pre><code>{'electron':1, 'gamma':5, 'proton':43, 'boson':98, ...}
  </code></pre>
  
  <p>My current code is showing an error message of "base 10..."</p>
  
  <pre><code>def d(n):
          pair = dict()
          for i in range(0,n):
                  word = input().split()
                  key = word[0]
                  value = word[1]
                  pair[key]=value
          print(pair)
  
  n = int(input())          
  d ={}                     
  for i in range(n):        
      text = input().split()
      d[text[0]] = text[1]
  print(d)
  </code></pre>