title: Generate permutations of python dict with nested lists
body: <p>I have a python dictionary which includes some nested lists and might look as follows:</p>
  
  <pre><code>Dict = {
  "a": [0.1, 20],
  "b": 300,
  "c": ["sun", "moon"],
  "d": "water",
  }
  </code></pre>
  
  <p>I am now trying to generate all possible unique permutations of this dictionary where each key only has one entry (i.e. no nested lists anymore). The desired dictionaries would look like these:</p>
  
  <pre><code>Dict1 = {
  "a": 0.1,
  "b": 300,
  "c": "sun",
  "d": "water",
  }
  
  Dict2 = {
  "a": 0.1,
  "b": 300,
  "c": "moon",
  "d": "water",
  }
  
  Dict3 = {
  "a": 20,
  "b": 300,
  "c": "sun",
  "d": "water",
  }
  
  Dict4 = {
  "a": 20,
  "b": 300,
  "c": "moon",
  "d": "water",
  }
  </code></pre>
  
  <p>After looking at comparable problems I have tried my luck with itertools but have not succeeded thus far. I am rather new to pyhton and am also not sure if dictionaries are even the most appropriate datastructure for this problem, so any advice will me much appreciated.</p>
  
  <pre><code>import itertools 
  keys, values = zip(*Dict.items()) 
  results = [dict(zip(keys, v)) for v in itertools.product(values)] 
  </code></pre>