On Wed, Nov 18, 2015 at 5:34 PM, fl <rxjw...@gmail.com> wrote:
> After I try with
>
> list1 = eList(12, [2])
>
> and
>
> list1 = eList(12)
>
> it gives me new surprises. Even though I delete list1, the subsequent
> list1 = eList(12)
> will remember the number of '12' of the previous sequence. This is my new
> question: What does 'del' do? It does not look like a thorough list deletion
>  from the effect.

It just deletes the variable list1, i.e. it unbinds the value from the
name. It does nothing at all to the list that was bound, as other
variables may still be bound to it.

The core issue is that the default value of your eList function is
always the same list. Assigning that list to a variable and then
unassigning it is not going to change that.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to