gry@ll.mit.edu wrote:

> To delete all the elements of a list, should one do:
> 
>    lst[:] = []
> or
>    del(lst[:])

del lst[:]

Note that del is not a function - the parentheses are not needed, and in
fact obscure the intent.

Tim Delaney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to