convert list of tuples into several lists
Steven Bethard
steven.bethard at gmail.com
Fri Feb 11 12:20:37 EST 2005
Pierre Quentel wrote:
> Could someone explain why this doesn't work :
>
> Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> def f(*args,**kw):
> ... print args, kw
> ...
> >>> f(*[1,2])
> (1, 2) {}
> >>> f(*[1,2],x=1)
> File "<stdin>", line 1
> f(*[1,2],x=1)
> ^
> SyntaxError: invalid syntax
> >>>
http://docs.python.org/ref/calls.html
Steve
More information about the Python-list
mailing list