Python: define multiple variables of same type?
<p>Probably a duplicate, but I can't find the answer by searching with these terms, at least. </p>

<p>Is there a quicker way to do this in Python?</p>

<pre><code>level1 = {}
level2 = {}
level3 = {}
</code></pre>

<p>I've tried</p>

<pre><code>level1 = level2 = level3 = {}
</code></pre>

<p>But that seems to create copies of the object, which isn't what I want. And</p>

<pre><code>level1, level2, level3 = {}
</code></pre>

<p>throws an error. </p>
