import multiprocessing as mp


def cube(x):
    return x ** 3


pool = mp.Pool(processes=4)
results = [pool.apply_async(cube, args=(x,)) for x in range(1, 7)]
output = [p.get() for p in results]
print(results)
print(output)

456b6ec4516dd47576f3aaef7f592f9b208c6fe8
<mask token>


def cube(x):
    return x ** 3


<mask token>

<mask token>


def cube(x):
    return x ** 3


<mask token>
print(results)
print(output)

<mask token>


def cube(x):
    return x ** 3


pool = mp.Pool(processes=4)
results = [pool.apply_async(cube, args=(x,)) for x in range(1, 7)]
output = [p.get() for p in results]
print(results)
print(output)

import multiprocessing as mp


def cube(x):
    return x ** 3


pool = mp.Pool(processes=4)
results = [pool.apply_async(cube, args=(x,)) for x in range(1, 7)]
output = [p.get() for p in results]
print(results)
print(output)
