I'm going through some old code trying to understand what it does, and I came across this odd statement:
*x ,= p
p
is a list in this context. I've been trying to figure out what this statement does. As far as I can tell, it just sets x
to the value of p
. For example:
p = [1,2]
*x ,= p
print(x)
Just gives
[1, 2]
So is this any different than x = p
? Any idea what this syntax is doing?