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()
Standard input is empty
[55, 610, 6765]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!