This is an ideal use case for understanding a list with two sentences:
>>> def g1(x): return 1*x
...
>>> def g2(x): return 2*x
...
>>> def g3(x): return 3*x
...
>>> funcs = [g1,g2,g3]
>>> args = [4,5,6]
>>> [f(a) for f in funcs for a in args]
[4, 5, 6, 8, 10, 12, 12, 15, 18]
>>>
This is a superbly readable and highly functional list that has been borrowed from Haskell.
, :
>>> import itertools
>>> list(map(lambda f,a : f(a), *zip(*itertools.product(funcs,args))))
[4, 5, 6, 8, 10, 12, 12, 15, 18]
, , . .