title: python - iterating list of dictionaries and unpacking
body: <p>Given a flat list of simple dictionaries</p>
  
  <pre><code>lst = [{'key1': 1}, {'key2': 2}, {'key3': 3}]
  </code></pre>
  
  <p>I'd like to find the dict that yields the minimum value evaluated using a method not detailed here.
  My first idea was to iterate the list to check dict by dict, but this fails:</p>
  
  <pre><code>for k, v in [x.items() for x in lst]:
      print(k, v)
  </code></pre>
  
  <p>results ValueError (as well as using a generator instead of the list):</p>
  
  <pre><code>for k, v in [x.items() for x in lst]:
  ValueError: not enough values to unpack (expected 2, got 1)
  </code></pre>
  
  <p>However,</p>
  
  <pre><code>for x in lst:
      for k, v in x.items():
          print(k, v)
  </code></pre>
  
  <p>yields</p>
  
  <pre><code>key1 1
  key2 2
  key3 3
  </code></pre>
  
  <p>As expected. I assume all approaches work as intended (unless PEBKAC), but why doesn't it work using the list comprehension? Could someone enlighten me?</p>
  
  <p>Edit: I use python 3 and I know items() yields a dict_view but I don't see why the logic doesn't work.</p>