def f(tup):
    key, x, p = tup
return key, x ** p
if __name__ == '__main__':
    pool = mp.Pool()
inputs = list(range(10))
inputs = [('1**1', 1, 1), ('2**2', 2, 2), ('2**3', 2, 3), ('3**3', 3, 3)]
result = dict(pool.map(f, inputs))
Python sharing a dictionary between parallel processes