def func(): return [lambda x: x*i for i in range(5)] def foo(): return [m(2) for m in func()] res = foo() print(res) >>> [8, 8, 8, 8]