here is my code
from multiprocessing import Pool a = [] def f(x): a.append(x*x) return x*x if __name__ == \'__main__\': with Pool(5) as p: