Python list problem

python: m=[[0]*3]*2 for i in range(3): m[0][i]=1 print m I expect that this code should print [[1, 1, 1], [0, 0, 0]] but it prints [[1, 1, 1], [1, 1, 1]] Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. … Read more