title: How do I parallelize a simple Python loop?
body: <p>This is probably a trivial question, but how do I parallelize the following loop in python?</p>
  
  <pre><code># setup output lists
  output1 = list()
  output2 = list()
  output3 = list()
  
  for j in range(0, 10):
      # calc individual parameter value
      parameter = j * offset
      # call the calculation
      out1, out2, out3 = calc_stuff(parameter = parameter)
  
      # put results into correct output list
      output1.append(out1)
      output2.append(out2)
      output3.append(out3)
  </code></pre>
  
  <p>I know how to start single threads in Python but I don't know how to "collect" the results. </p>
  
  <p>Multiple processes would be fine too - whatever is easiest for this case. I'm using currently Linux but the code should run on Windows and Mac as-well.</p>
  
  <p>What's the easiest way to parallelize this code?</p>