title: Using dict.fromkeys(), assign each value to an empty dictionary
body: <p>I've hit a bit of a problem with creating empty dictionaries within dictionaries while using <code>fromkeys()</code>; they all link to the same one.</p>
  
  <p>Here's a quick bit of code to demonstrate what I mean:</p>
  
  <pre><code>a = dict.fromkeys( range( 3 ), {} )
  for key in a:
      a[key][0] = key
  </code></pre>
  
  <p>Output I'd want is like <code>a[0][0]=0, a[1][0]=1, a[2][0]=2</code>, yet they all equal <code>2</code> since it's editing the same dictionarionary 3 times</p>
  
  <p>If I was to define the dictionary like <code>a = {0: {}, 1: {}, 2: {}}</code>, it works, but that's not very practical for if you need to build it from a bigger list.</p>
  
  <p>With fromkeys, I've tried <code>{}</code>, <code>dict()</code>, <code>dict.copy()</code> and <code>b={}; b.copy()</code>, how would I go about doing this?</p>