title: How does `sum` flatten lists?
body: <p>A multidimensional list like <code>l=[[1,2],[3,4]]</code> could be converted to a 1D one by doing <code>sum(l,[])</code>. How does this happen?</p>
  <p>(This doesn't work directly for higher multidimensional lists, but it can be repeated to handle those cases. For example if A is a 3D-list, then sum(sum(A),[]),[]) will flatten A to a 1D list.)</p>