title: assigning values to dictionary keys with list comprehension
body: <p>This is mostly a question of good/pythonic style. I have a dictionary which has lists for values, i.e.</p>
  
  <pre><code>my_dict = {"a": a_list, "b": b_list, "c": c_list}
  </code></pre>
  
  <p>and so on. I also have an empty dictionary with the same keys, in which I want to store the mean of these lists against their key. If instead of using a second dictionary, I used a nested list, I could do</p>
  
  <pre><code>mean_lists = [[key, sum(l)/len(l)] for key, l in my_dict.items() if l]
  </code></pre>
  
  <p>giving an output</p>
  
  <pre><code>[["a", a_mean], ["b", b_mean], ["c", c_mean]]
  </code></pre>
  
  <p>which seems neat to me. Is there a way to do this nicely outputting as a dictionary, or is something like this:</p>
  
  <pre><code>mean_dict = {key: [] for key in my_dict}
  for key, l in my_dict.items():
      if l:
          mean_dict[key] = sum(l)/len(l)
  </code></pre>
  
  <p>the best I can do?</p>