from multiprocessing import Pool, Manager
def init_processes(l):
global final_list
final_list = l
def get_inf(data):
for item in data:
final_list.append(item)
def main():
manager = Manager()
final_list = manager.list()
a = [('one', 'two', 'three', 'four', 'five'), ('six', 'seven', 'eight', 'nine', 'ten')]
with Pool(3, initializer=init_processes, initargs=(final_list,)) as p:
p.map(get_inf, a)
print(final_list)
if __name__ == '__main__':
main()