KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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]]
Tags (comma-separated)
Save Edits
Cancel