title: appending to a 2D list in python where the row/col length is unknown
body: <p>I am looking to flip the rows and columns on a 2D list and am running into trouble.  Python won't allow a value to be assigned to an uninitialized 'cell'.  I am not sure how to initialize my grid since I don't know the length ahead of time.  The following:</p>
  
  <pre><code>data = list()
  maReader = csv.reader(open('TEST.csv', 'rb'), delimiter=',', quotechar='"')
  for rindex, row in enumerate(maReader):
      for iindex, item in enumerate(row):
          data[iindex][rindex] = item
  </code></pre>
  
  <p>fails with a "IndexError: list assignment index out of range" error.  I could loop through twice, the first time to count columns and rows, than initialize the grid, than loop again and assign values, but that seems awfully wasteful.</p>
  
  <p>I am pretty new to Python and figure there is a simple way to do this that I am missing.</p>
  
  <p>Thanks for the help.</p>