Deleting more than one element from a list

Simon Brunning simon at brunningonline.net
Wed Apr 21 16:12:11 EDT 2010


On 21 April 2010 20:56, candide <candide at free.invalid> wrote:
> Is the del instruction able to remove _at the same_ time more than one
> element from a list ?

Yup:

>>> z=[45,12,96,33,66,'ccccc',20,99]
>>> del z[:]
>>> z
[]

-- 
Cheers,
Simon B.



More information about the Python-list mailing list