I have a function which recursively calls itself. Here is an example:
def f(a,b=0):
if b < 5:
for i in range(10):
a += f(a+i,b+1)
return a+b
print f(3)
Now I want to run 10 function calls inside the function each one in a separate thread simultaneously but get the return from all in one variable together.
Could someone lead me into the right direction?