Coding style

Dave Hansen iddw at hotmail.com
Mon Jul 17 15:35:17 EDT 2006


On Mon, 17 Jul 2006 17:09:32 +0100 in comp.lang.python, "Simon
Brunning" <simon at brunningonline.net> wrote:

[...]
>
>lst = [1,2,3,4,5]
>while lst:
>    lst.pop()
>
>Or even just:
>
>lst = []
>

 del lst[:]

is probably closer to what the OP wants...

Regards,
                                        -=Dave

-- 
Change is inevitable, progress is not.



More information about the Python-list mailing list