The standard idiom (I guess) is to use the slice
>>> a=[1,2,3,4]
>>> b=a
>>> b is a
True
>>> b
[1, 2, 3, 4]
>>> c=a[:]
>>> c is a
False
>>> c
[1, 2, 3, 4]

This is shallow copy
If you want deep copy then
from copy import deepcopy
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to