M
mk
Hello everyone,
From time to time I spot an asterisk (*) used in the Python code
_outside_ the usual *args or **kwargs application.
E.g. here: http://www.norvig.com/python-lisp.html
def transpose (m):
return zip(*m)
What does *m mean in this example and how does it do the magic here?
Regards,
mk
From time to time I spot an asterisk (*) used in the Python code
_outside_ the usual *args or **kwargs application.
E.g. here: http://www.norvig.com/python-lisp.html
def transpose (m):
return zip(*m)
[(1, 4), (2, 5), (3, 6)]>>> transpose([[1,2,3], [4,5,6]])
What does *m mean in this example and how does it do the magic here?
Regards,
mk