title: Two dimensional array in python
body: <p>I want to know how to declare a two dimensional array in Python.</p>
  
  <pre><code>arr = [[]]
  
  arr[0].append("aa1")
  arr[0].append("aa2")
  arr[1].append("bb1")
  arr[1].append("bb2")
  arr[1].append("bb3")
  </code></pre>
  
  <p>The first two assignments work fine. But when I try to do, <code>arr[1].append("bb1")</code>, I get the following error:</p>
  
  <pre><code>IndexError: list index out of range.
  </code></pre>
  
  <p>Am I doing anything silly in trying to declare the 2-D array?</p>
  
  <p><strong>Edit:</strong>
  <br />but I do not know the number of elements in the array (both rows and columns). </p>