[EMAIL PROTECTED] wrote:
> python wrote:
>> after del list , when I use it again, prompt 'not defined'.how could i
>> delete its element,but not itself?
> 
> This is a way:
>>>> a = range(10)
>>>> del a[:]
or simply
a = []
>>>> a
> []

>>>> a.append(20)
>>>> a
> [20]
> 
> Bye,
> bearophile
> 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to