title: How to initialize a dict with keys from a list and empty value in Python?
body: <p>I'd like to get from this:</p>
  
  <pre><code>keys = [1,2,3]
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>{1: None, 2: None, 3: None}
  </code></pre>
  
  <p>Is there a pythonic way of doing it?</p>
  
  <p>This is an ugly way to do it:</p>
  
  <pre><code>&gt;&gt;&gt; keys = [1,2,3]
  &gt;&gt;&gt; dict([(1,2)])
  {1: 2}
  &gt;&gt;&gt; dict(zip(keys, [None]*len(keys)))
  {1: None, 2: None, 3: None}
  </code></pre>