B
barberomarcelo
Maybe I'm missing something but the latter is not the behaviour I'm
expecting:
.... b[x] = b[x] + 10
....
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)]
on win32
Windows XP
Marcelo
expecting:
.... for x in range(4):a = [[1,2,3,4], [5,6,7,8]]
b = a[:]
b [[1, 2, 3, 4], [5, 6, 7, 8]]
a == b True
a is b False
for i in range(len(b)):
.... b[x] = b[x] + 10
....
b [[11, 12, 13, 14], [15, 16, 17, 18]]
a [[11, 12, 13, 14], [15, 16, 17, 18]]
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)]
on win32
Windows XP
Marcelo