title: Find values within lists in dictionary
body: <p>I was given this list with historical scores of games from a popular college team (Oregon Ducks):</p>
  
  <pre><code>[
      '1916-10-07,1916,Willamette,97,0\n',
      '1916-10-14,1916,Multnomah A.C.,28,0\n',
      '1916-10-21,1916,California,39,14\n',
      '1916-11-04,1916,Washington,0,0\n',
      '1916-11-11,1916,Washington State,12,3\n',
  ]
  </code></pre>
  
  <p>I wrote code to extract the season, duck's scores, and allowed scores and put them in a dictionary:</p>
  
  <pre><code>def parse_football_data(lst):
  
      DUCKS = {
          'season': [int(i.split(',')[1]) for i in lst],
          'scored': [int(i.split(',')[3]) for i in lst],
          'allowed': [int(i.split(',')[4].strip()) for i in lst],
      }
      return DUCKS
  </code></pre>
  
  <p>Which has this output:</p>
  
  <pre><code>{'season': [1916, 1916, 1916, 1916, 1916],
   'scored': [97, 28, 39, 0, 12],
   'allowed': [0, 0, 14, 0, 3]}
  </code></pre>
  
  <p>I now need to write a function <code>def total_by_year(games, year):</code> which will give me the sum of scores for the input year, and the opposing's team allowed scores in this format:</p>
  
  <pre><code>total_by_year(dct, 1916)
  (51, 17)
  </code></pre>
  
  <p>when I input this using my previous function:</p>
  
  <pre><code>dct = parse_football_data([
      '1916-10-21,1916,California,39,14\n',
      '1916-11-04,1916,Washington,0,0\n',
      '1916-11-11,1916,Washington State,12,3\n',
      '1917-11-17,1917,California,21,0\n',
      '1917-11-29,1917,Oregon State,7,14\n'
  ])
  </code></pre>
  
  <p>How can I match the year to the "season" and "allowed" keys in the dictionary?</p>