title: Updating dictionary values of keys from a .txt file
body: <p>So I've created a dictionary off the txt file "PM.txt" where the key is the player and the value is their penalty minutes. I know dictionary keys have to be unique so how would I update the value of the key adding it to the current value, as the key exists more than once in the txt file.</p>
  
  <pre><code>    "PM.txt"
      Neil,2
      Paul,5
      Neil,10
      Santos,2
      Neil,2
      Santos,10
      Paul,2
      Alex,2
  </code></pre>
  
  <p>So far I have this which returns:</p>
  
  <p>{'Alex': 2, 'Santos': 10, 'Paul': 2, 'Neil': 2}</p>
  
  <pre><code>    def pm_dict(filename):
          f = open(filename, 'r')
          dict = {}
          for line in f:
              x = line.split(",")
              player = x[0]
              minutes = x[1]
              c = len(minutes)-2
              minutes = minutes[0:c]
              dict[player] = minutes
  
          return dict
  </code></pre>
  
  <p>But how would I create a function or a helper for it to return:</p>
  
  <p>{'Alex': 2, 'Santos': 12, 'Paul': 7, 'Neil': 14}</p>