title: dictionary group by substring of key
body: <p>In Python3, I have a dictionnary <em>{k = episode : value = count}</em> and I can't figure out how to group by substring of keys where values are summed.</p>
  <p>input:</p>
  <pre><code>dict = {'S01E01': 27, 'S01E02': 27, 'S01E03': 32, 'S01E04': 36, 'S01E05': 35, 'S01E06': 31,
   'S02E01': 33, 'S02E02': 21, 'S02E03': 20, 'S02E04': 29, 'S02E05': 33, 'S02E06': 42}
  </code></pre>
  <p>Wanted ouput:</p>
  <pre><code>output_dict = {'S01': 188 , 'S02' : 178}
  </code></pre>
  <p>I've tried building an intermediary list of seasons and tried to use reduce &amp; counter functions with no success.</p>
  <pre><code>List = ['S01', 'S02']
  </code></pre>
  <p>Also tried looking for any results in here but couldn't find anything. Wrong terminology probably. Any help would be appreciated.
  Thanks</p>