The id() test sheds some more light on this ...
[php]mlist3 = [[0]*3]*3
print mlist3 # [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
# give it the id() test ...
# all three sublists objects show the same address, 10317016 on my machine
# so they are alias copies, not true copies
print mlist3[0], id(mlist3[0]) # [0, 0, 0] 10317016
print mlist3[1], id(mlist3[1]) # [0, 0, 0] 10317016
print mlist3[2], id(mlist3[2]) # [0, 0, 0] 10317016
mlist4 = []
for k in range(3):
mlist4.append([0, 0, 0])
print mlist4 # [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
# the id() test shows them to be different objects
print mlist4[0], id(mlist4[0]) # [0, 0, 0] 10316936
print mlist4[1], id(mlist4[1]) # [0, 0, 0] 10316976
print mlist4[2], id(mlist4[2]) # [0, 0, 0] 10317096
[/php]