python at mrabarnett.plus.com
Thu Jul 9 15:25:36 CEST 2009
> Hello ,
> When i==0 you append an empty list to arr, so arr[i] is
> arr. No
> When i==10 you append another empty list to arr, so arr[i] is arr.
> Index error because there's no arr, only arr and arr.
> Thanks for your prompt reply...
> How can i pass this problem
> You could try appending to arr[-1] instead.
> Better still:
> row = 
> for j in range(0,1001,1):
> I tried both the ways... the only thing is its not coming like 0 10
> 20.......1000 . Its coming like 0,1,2,........1000.....Any answer to the
Each row should be 1 more than the previous row and each column should
be 10 more than the previous column. Just swap your ranges.
More information about the Python-list