Some posts about parallelizing for loop in Python already exist such as this one but I can't use them to deal with my issue. Let's take a simple example. I have three lists :
L1 = [1,2,3]
L2 = [3,4,5]
L3 = [5,6,7]
I would like to double each element of the list. I could do this :
for l in [L1,L2,L3] :
for i in range(len(l)) :
l[i] = l[i]*2
How please could I parallelize this code to transform L1, L2 and L3 in parallel ?
Note that this example is just to have a clear and easy to understand example, I know that it is not a good idea in reality to parallelize a quick code like that