Tanmoy wrote:
Hello , When i==0 you append an empty list to arr, so arr[i] is arr[0]. No problem.When i==10 you append another empty list to arr, so arr[i] is arr[10]. Index error because there's no arr[10], only arr[0] and arr[1].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):
row.append(i+j)
arr.append(row)
...
--
http://mail.python.org/mailman/listinfo/python-list
