cnb wrote:
And there isn't a .copy function so I have to "new = [] for element in list: new.append(element)"?
You can do
new = list(old)
which I like for being explicit, or just
new = old[:]
and what is the difference between extend and + on lists?
>>> a = range(3)
>>> b = a + range(3)
>>> b
[0, 1, 2, 0, 1, 2]
>>> a
[0, 1, 2]
>>> a.extend(range(3))
>>> a
[0, 1, 2, 0, 1, 2]
hth,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
