Python slice with del statement

Viewed 2362

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?

1 Answers
Related