Why does this:
del a[:]
delete all entries in the list a?
As far as I understand, a[:] returns a copy of a. So shouldn't del a[:] delete the copy of a?
Why does this:
del a[:]
delete all entries in the list a?
As far as I understand, a[:] returns a copy of a. So shouldn't del a[:] delete the copy of a?