Passing every element of a list as argument to a function

Antonio Vera chichimeco at gmail.com
Tue Aug 9 13:02:25 EDT 2011


Hi!,
I have a very simple syntax question. I want to evaluate a library
function f receiving an arbitrary number of arguments (like
itertools.product), on the elements of a list l. This means that I
want to compute f(l[0],l[1],...,l[len(l)-1]).

Is there any operation "op" such that f(op(l)) will give the sequence
of elements of l as arguments to f?

Thanks for your time.
Best,
Antonio



More information about the Python-list mailing list