title: How to return a sorted dictionary's keys by sorting its values
body: <p>I have a dictionary like this:</p>
  
  <pre><code>a = {'str1':[int,int,int],'str2':[int,int]}
  </code></pre>
  
  <p>I want to returns the keys like  <code>['str1', 'str2']</code> because sum of sum(a[str1]) > sum(a[str2])</p>
  
  <p>I tried to use the sum function:</p>
  
  <pre><code>return sorted(a.keys(), key = lambda a.values(): sum(a.values()))
  </code></pre>
  
  <p>But it raises an error.
      TypeError: unsupported operand type(s) for +: 'int' and 'list'</p>
  
  <p>How should I do?</p>