What is the result of unpacking? I thought the unpacking result is a first class citizen that I can use as an object.
>>> print(*range(5))
0 1 2 3 4
However, apparently it cannot be evaluated to be an object and I cannot get its type. So, I wonder what is the unpacking operation generating?
>>> *range(5)
File "<stdin>", line 1
SyntaxError: can't use starred expression here
>>> type(*range(5))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: type() takes 1 or 3 arguments
>>> *values, = 1,2,3
>>> values
[1, 2, 3]
>>> *values
File "<stdin>", line 1
SyntaxError: can't use starred expression here