title: Python dict with lists as values, create list of dicts with all possible combinations of original keys-values
body: <p>I have a dict where all values are lists:</p>
  <pre><code>original_dict = {&quot;key_00&quot;: [0, 1],
                      &quot;key_01&quot;: [2, 3]
                      }
  
  </code></pre>
  <p>I want to get a list of dicts, where to each key is associated one of the original corresponding values, forming all the possible combinations...in other words, like this:</p>
  <pre><code>[
  {&quot;key_00&quot;: 0, &quot;key_01&quot;: 2},
  {&quot;key_00&quot;: 0, &quot;key_01&quot;: 3},
  {&quot;key_00&quot;: 1, &quot;key_01&quot;: 2},
  {&quot;key_00&quot;: 1, &quot;key_01&quot;: 3}
  ]
  </code></pre>
  <p>I tried using something like this:</p>
  <pre><code>res = []
  for combs in product(*original_dict.values()):
      # zip used to perform cross keys combinations.
      res.append([{ele: cnt} for ele, cnt in zip(original_dict, combs)])
  </code></pre>
  <p>but this way I end up having</p>
  <pre><code>[{'key_00': 0}, {'key_01': 2}]
  [{'key_00': 0}, {'key_01': 3}]
  [{'key_00': 1}, {'key_01': 2}]
  [{'key_00': 1}, {'key_01': 3}]    
  </code></pre>