Thursday, 15 August 2013

python evaluate functions with parameters given by a dictionary

python evaluate functions with parameters given by a dictionary

With python how can I evaluate a dictionary of functions with their
associate parameters. To be more specific, the keys are the functions and
the values are a list of paramters.
for example, consider the dictionary:
{f1: [a, b, c], f2: [q], f3: [5, c]}
How would I iterate over the functions to compute:
f1(a, b, c)
f2(q)
f3(5, c)

No comments:

Post a Comment