1 #!/usr/bin/env python 2 from multiprocessing import Process 3 4 li = [] 5 def f1(a1): 6 li.append(a1) 7 print(li) 8 if __name__ == '__main__': 9 for i in range(10): 10 t = Process(target=f1,args=(i,)) 11 t.start()