Flatten a list/tuple and Call a function with tuples

beginner zyzhu2000 at gmail.com
Wed Jul 25 21:00:08 EDT 2007


> Also, this has not been suggested:
>
> py> def g():
> ...   return (1,2)
> ...
> py> def f(a,b,c):
> ...   return a+b+c
> ...
> py> f(c=10, *g())
> 13
>
> James- Hide quoted text -
>
> - Show quoted text -

Great idea.




More information about the Python-list mailing list