I get the following error from running this code. Was wondering if 'i' and 'j' are considered objects.
If yes is there any way i could cast them..... How do i write a better for loop for this....
array2D = [[0 for i in range(10)]for j in range(10)]
for i in array2D:
for j in array2D[0]:
array2D[j] = 2;
Traceback (most recent call last):
File "/Users/yasinyaqoobi/Documents/workspace/Python_Hello_World/src/2dArray/__init__.py", line 7, in <module>
array2D[j] = 2;
TypeError: list indices must be integers