pep448

Python: Splat/unpack operator * in python cannot be used in an expression?

Python: Splat/unpack operator * in python cannot be used in an expression? Question: Does anybody know the reasoning as to why the unary (*) operator cannot be used in an expression involving iterators/lists/tuples? Why is it only limited to function unpacking? or am I wrong in thinking that? For example: >>> [1,2,3, *[4,5,6]] File “<stdin>”, …

Total answers: 3