I was trying to make an identity matrix to find the inverse. But I am stuck at this moment due to a bug in the code. A fresh eye would help a lot.
identity=[]
null=[]
for i in range(3):
null.append(i*0)
for j in range(3):
identity.append(null)
for k in range(3):
identity[k][k]=1
print(identity)
The result I got
[[1, 1, 1], [1, 1, 1], [1, 1, 1]]
what I desired for
[[1, 0, 0], [0, 1, 0], [0, 0, 1]]