title: Shorthand to create a dictionary of lists?
body: <p>I have a list of keys and want to create a dictionary that looks as follows:</p>
  
  <pre><code>d = {"a":[] ,"b":[] ,"c":[] ,"d":[]}
  </code></pre>
  
  <p>If i try something like this:</p>
  
  <pre><code>keys = ['a','b','c','d']
  d = dict(zip(keys,[[]]*len(keys)))
  </code></pre>
  
  <p>it creates the dictionary just fine, except all lists are references to the same object, so if I try <code>d['c'].append('one')</code> then it gets appended to all four lists.</p>
  
  <p>I solved it using dict comprehension
  (for those interested: <code>d = {k : [] for k in keys}</code>) but wondering if there's a more efficient way?</p>
  
  <p>Edit: yes I KNOW it's a dict comprehension. That was a typo obviously.</p>