How do you initialize and index a list of dictionaries in Python?
<p>Currently I have something that looks like this:</p>

<pre><code>   if width &lt; 101:
      column_placement_0[index] = rectangles
   elif width &lt; 201:
      column_placement_1[index] = rectangles
   elif width &lt; 301:
       column_placement_2[index] = rectangles
</code></pre>

<p>... and so on.</p>

<p>Instead, I want to be able to just initialize a single columns array which stores dictionaries.</p>

<p>First, I feel that I would initialize an array normally...</p>

<pre><code>columns = []
</code></pre>

<p>but then I don't know how I would reference the individual list and dictionary indices maybe something like a 2D array in Java?</p>

<pre><code>columns[index][dict_key] = value
</code></pre>

<p>What do I do?</p>