title: Summarizing a dictionary of arrays in Python
body: <p>I got the following dictionary:</p>
  
  <pre><code>mydict = {
    'foo': [1,19,2,3,24,52,2,6],          # sum: 109
    'bar': [50,5,9,7,66,3,2,44],          # sum: 186
    'another': [1,2,3,4,5,6,7,8],         # sum:  36
    'entry': [0,0,0,2,99,4,33,55],        # sum: 193
    'onemore': [21,22,23,24,25,26,27,28]  # sum: 196
  }
  </code></pre>
  
  <p>I need to efficiently filter out and sort the top x entries by the sum of the array.</p>
  
  <p>For example, the <strong>Top 3 sorted</strong> and <strong>filtered</strong> list for the example above would be</p>
  
  <pre><code>sorted_filtered_dict = {
    'onemore': [21,22,23,24,25,26,27,28], # sum: 196
    'entry': [0,0,0,2,99,4,33,55],        # sum: 193
    'bar': [50,5,9,7,66,3,2,44]           # sum: 186
  }
  </code></pre>
  
  <p>I'm fairly new to Python, and tried it myself with chaining a sum and filter function on a lambda function, but struggled with the actual syntax. </p>