in 19x19 matrix with all components == 0
now (list of list a)
for example, i want to change a[1][1]
to 1
but they changed all index(1) of lists of list(a)
emphasized text tried to stop using for- sentence and changed to while-, just typed several times not using loops.
a = []
row = []
for i in range(19) :
row.append(0)
for i in range(19) :
a.append(row)
#19x19 matrix a has been made
n = int(input())
for j in range(n) :
x, y = map(int, input().split())
a[x-1][y-1] = 1
for k in a :
print(k)