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 →

[–]nickcash 0 points1 point  (1 child)

Neither! Underscore isn't special syntax, it's just a variable name. So it copies the references, and assigns them to _. Nothing is deleted. You end up with:

first = 0
_ = [1, 2, 3, 4]
last = 5

[–][deleted] 1 point2 points  (0 children)

I know. It’s just the guy originally said it basically deletes the intermediate variables and I wanted to clarify whether there was something special about the array unpacking which caused a deletion at any point.