for data in main_data:
data_to_write = calculateAnswer(data, pass_list, id)
In this "pass_list" I am sending same list [somedata] again and again (due to for loop)? Is there a better way to do this performance wise without declaring "pass_list" global?
Or should I just take the function and write it in the place where it is called. hopefully I have explained clearly.