0

How would one parallelize the following scenario?

output = []
time = [1, 2, 3, 4, 5]  
var_a = 5
var_b = 7

for t in time:
   new_var_a = var_a*t
   new_var_b = some_func(var_a, t)
   add_dict = {"a": new_var_a, "b": new_var_b}
   output.append(add_dict)

Is it possible to parallelize this without making a function that takes var_a and var_b as arguments?

martineau
  • 119,623
  • 25
  • 170
  • 301
pete
  • 561
  • 6
  • 16

0 Answers0