How to pass list of function and all its arguments to be executed in another function in python?
<p>I have a list of functions and its arguments like this:</p>

<pre><code>(func1, *arg1), (func2, *arg2),...
</code></pre>

<p>I want to pass them into another function to execute them like this:</p>

<pre><code>for func, arg* in (list of funcs, args):
   func(arg*)
</code></pre>

<p>How to do it in python? I have tried several but it doesn't like unpacking and *arg at the same time.</p>

<p>You can do like this, just use list of tuple where first is the function name, and rest are arguments. </p>

<pre><code>def a(*args,**kwargs):
    print 1

list_f = [(a,1,2,3)]

for f in list_f:
    f[0](f[1:])
</code></pre>

python