today i have again a question about multiprocessing... I have a small example code:
import multiprocessing
def function(a):
v = a**2
w = a**3
x = a**4
y = a**5
z = a**6
b = [1,2,3,4,5,6,7,8,9,10]
if __name__ == "__main__":
pool = multiprocessing.Pool(processes=4)
pool.imap(function, b)
The results should be 5 lists (vlist, wlist, xlist, ylist and zlist). The vlist should have all the v results, the wlist the w results and so on. I want to get all results ordered, so i want to use imap, i hope its the right way. I thought i could use something like append commands but i don't know how...
Thank you for helping, John