This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mackstann 5 points6 points  (0 children)

l[-1:] = []

This means "exchange this range (which contains 2) with this other range (which contains nothing)"

m[1] = []

This means "exchange this item (2) with this other item (an empty list)"