title: Multiple Unpacking Assignment in Python when you don't know the sequence length
body: <p>The textbook examples of multiple unpacking assignment are something like:</p>
  
  <pre><code>import numpy as NP
  M = NP.arange(5)
  a, b, c, d, e = M
  # so of course, a = 0, b = 1, etc.
  
  M = NP.arange(20).reshape(5, 4)     # numpy 5x4 array
  a, b, c, d, e = M
  # here, a = M[0,:], b = M[1,:], etc. (ie, a single row of M is assigned each to a through e)
  </code></pre>
  
  <p>(My question is not <code>numpy</code> specific. Indeed, I would prefer a pure Python solution.)</p>
  
  <p>For the piece of code I'm looking at now, I see two complications on that straightforward scenario:</p>
  
  <ul>
  <li><p>I usually won't know the shape of M; and</p></li>
  <li><p>I want to unpack a certain number of
  items (definitely less than all items), and
  I want to put the remainder into a <strong>single</strong>
  container</p></li>
  </ul>
  
  <p>So back to the 5x4 array above, what I would very much like to do is  assign the first three rows of M to a, b, and c respectively (exactly as above), and the <strong>rest of the rows</strong> (I have no idea how many there will be, just some positive integer) to a single container, <code>all_the_rest = []</code>.</p>