from multiprocessing import Pool import multiprocessing def cube(x): return x**3 pool = multiprocessing.Pool(processes = 1) results = [pool.apply(cube, args=(x,)) for x in range (1, 7)] print(results)