Hello

Tanmoy mukherjee.tanmoy at gmail.com
Thu Jul 9 04:18:30 EDT 2009


Hi ...
    I have been trying to set this 2-D array of this sort.

  0 10 20 ........... 1000
  1 11 21...............

   1000


Here is the code i tried ...

arr=[]
for i in range(0,1010,10):
    arr.append([])
    for j in range(0,1001,1):
          arr[i].append(i+j)

print arr

I am getting the following error
 list index out of range

Please let me know where am i getting wrong.

Sincerely
tank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090709/ae1f5689/attachment.html>


More information about the Python-list mailing list