Hello how can I update my 2D array list using my 1D array list
Here my code so far:
x2D=[[0,1],[1,1],[0,0]]
x1D = [1,0,0,1,1,0]
for x in range(2): #index of 2D
for y in range(6): #index 1D
if x1D in x2D[x]:
x2D[x][0:y] == x1D[y]
print(x2D)
I want to change the all the value of 1 into 0 in 2D if 1D has 0 in that index: I want the output to be like this: x2D=[[0,0],[0,1],[1,0]]