I have one function with multi arguments. and I need to run this function parallel for different inputs. how can I do that? I know the 'multiprocessing' module. but my problem is that for e.g pool. map accept just function with one argument. in other words, you think I have the below simple function. how can I run this function in parallel for different inputs?
def func(x,y,flag):
if flag == 1:
return x*y
if flag == 2:
return x+y
if flag == 3:
return x**y