I create a 6x5 2d array, initially with just None in each cell. I then read a file and replace the Nones with data as I read them. I create the empty array first because the
If you aren't going the numpy route, you can fake 2D arrays with dictionaries:
>>> x = dict( ((i,j),None) for i in range(5) for j in range(6) ) >>> print x[3,4] None