Python defaultdict initialise while creation : <p>Is there any way of initialise defaultdict during creation time ? I mean to achieve the same behaviour as this in one line:</p>

<pre><code>x = defaultdict(int)
x[1] = 2
</code></pre>

<p>something like:</p>

<pre><code>x = defaultdict(int, {1:2})
</code></pre>

<p>where <code>x[1] = 2</code> and rest all values are 0.</p>
