title: Unpack list of dictionaries in Python
body: <h2>Question</h2>
  
  <p>According to <a href="https://stackoverflow.com/a/26853961/5811400">this answer</a>, in Python 3.5 or greater, it is possible to merge two dictionaries <code>x</code> and <code>y</code> by unpacking them:</p>
  
  <pre><code>z = {**x, **y}
  </code></pre>
  
  <p>Is it possible to unpack a variadic list of dictionaries? Something like</p>
  
  <pre><code>def merge(*dicts):
      return {***dicts} # this fails, of course. What should I use here?
  </code></pre>
  
  <p>For instance, I would expect that</p>
  
  <pre><code>list_of_dicts = [{'a': 1, 'b': 2}, {'c': 3}, {'d': 4}]
  {***list_of_dicts} == {'a': 1, 'b': 2, 'c': 3, 'd': 4}
  </code></pre>
  
  <p>Note that this question is not about how to <em>merge</em> lists of dictionaries since the link above provides an answer to this. The question here is: is it possible, and how, to unpack lists of dictionaries?</p>
  
  <h2>Edit</h2>
  
  <p>As stated in the comments, this question is very similar to <a href="https://stackoverflow.com/questions/3494906/how-do-i-merge-a-list-of-dicts-into-a-single-dict">this one</a>. However, unpacking a list of dictionaries is different from simply merging them. Supposing that there was an operator <code>***</code> designed to unpack lists of dictionaries, and given</p>
  
  <pre><code>def print_values(a, b, c, d):
      print('a =', a)
      print('b =', b)
      print('c =', c)
      print('d =', d)
  
  list_of_dicts = [{'a': 1, 'b': 2}, {'c': 3}, {'d': 4}]
  </code></pre>
  
  <p>it would be possible to write</p>
  
  <pre><code>print_values(***list_of_dicts)
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>print_values(**merge(list_of_dicts))
  </code></pre>