Python dictionary initilization
<p>I am not sure if this is a bug or a feature.
I have a dictionary to be initialized with empty lists.</p>

<p>Lets say</p>

<pre><code>keys =['one','two','three']
sets = dict.fromkeys(keys,[])
</code></pre>

<p>What I observed is if you append any item to any of the lists all the lists are modified. </p>

<pre><code>sets = dict.fromkeys(['one','two','three'],[])
sets['one'].append(1)
</code></pre>

<p>sets </p>

<pre><code>{'three': [1],'two': [1], 'one': [1]}
</code></pre>

<p>But when I do it manually using loop, </p>

<pre><code>for key in keys:
      sets[key] = []
sets['one'].append(1)
</code></pre>

<p>sets</p>

<pre><code>{'three': [], 'two': [], 'one': [1]}
</code></pre>

<p>I would think the second behavior should be the default.</p>
