[Python-ideas] Why not f(*my_list,*my_other_list) ?
Daniel Stutzbach
daniel at stutzbachenterprises.com
Fri Sep 10 19:34:42 CEST 2010
On Fri, Sep 10, 2010 at 12:16 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> args_for_f = tuple(my_list) + tuple(my_other_list)
> f(*args_for_f)
>
An alternative with better performance is:
from itertools import chain
f(*chain(my_list, my_other_list))
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100910/fd0a1ab6/attachment.html>
More information about the Python-ideas
mailing list