from multiprocessing import Pool
def fib(n):
if n <= 1:
return n
else:
return(fib(n-1) + fib(n-2))
try:
p = Pool()
print (p.map(fib, [10, 15, 20]))
finally:
p.close()
ZnJvbSBtdWx0aXByb2Nlc3NpbmcgaW1wb3J0IFBvb2wKIApkZWYgZmliKG4pOgogICBpZiBuIDw9IDE6CiAgICAgICByZXR1cm4gbgogICBlbHNlOgogICAgICAgcmV0dXJuKGZpYihuLTEpICsgZmliKG4tMikpCiAKdHJ5OgoJcCA9IFBvb2woKQoJcHJpbnQgKHAubWFwKGZpYiwgWzEwLCAxNSwgMjBdKSkKZmluYWxseToKCXAuY2xvc2UoKQ==