4 ms·
Not having worked much with Python, what's the * next to x in lines 9 and 11 about?
by mc_ 16y ago
Not having worked much with Python, what's the * next to x in lines 9 and 11 about?
- 1331 16y agohttp://docs.python.org/reference/expressions.html#calls http://docs.python.org/reference/expressions.html#calls Line 9: A formal parameter using the syntax * identifier receives a tuple containing any excess positional arguments. Line 11: When the syntax * expression appears in the function call, expression evaluates to a sequence, the elements of which are treated as if they were the positional arguments.