0
Dear all I am new to programming and I am using Python.
I have the following code:
P=[]
i=0
j=0
P=[[0]*5]*5
while i<5:
for j in range(0,5):
P[i][j]=i-j
i=i+1
print(P)
And I expect the following output:
[[0, -1, -2,-3, -4], [1, 0, -1, -2, -3], [2, 1, 0, -1, -2], [3, 2, 1, ...