I am trying to pass a list as a parameter to the pool.map(co_refresh, input_list)
. However, pool.map
didn\'t trigger the function co_refresh
georgexsh's answer works perfectly in Python 3; the key is that starmap
allows to pass multiple arguments into the function.
However, if you use Python 2, you will need to use python classical unpacking mentioned in comments by Ahmed under the question here.
In my case, I just need to "enlist" the argument first in the function.
def func(args)
(a, b, c, d) = args
# You can then use a, b, c, d in your function
return;