title: Multiprocessing of shared list
body: <p>I have written a program like this: </p>
  
  <pre><code>from multiprocessing import Process, Manager
  
  def worker(i):
      x[i].append(i)
  
  if __name__ == '__main__':
      manager = Manager()
      x = manager.list()
      for i in range(5):
          x.append([])
      p = []
      for i in range(5):
          p.append(Process(target=worker, args=(i,)))
          p[i].start()
  
      for i in range(5):
          p[i].join()
  
      print x
  </code></pre>
  
  <p>I want to create a shared list of lists among processes and each process modify a list in it. But the result of this program is a list of empty lists: [[],[],[],[],[]]. </p>
  
  <p>What's going wrong?</p>