[Python-ideas] clear() method for lists

Mathias Panzenböck grosser.meister.morti at gmx.net
Wed Feb 10 15:12:41 CET 2010


On 02/10/2010 11:39 AM, wxyarv wrote:
> what about another method clone() (or copy())? i think this maybe useful either.
>

l1 = [1, 2, 3]
l2 = l1[:]
l3 = list(l1)



More information about the Python-ideas mailing list