title: Python - How do I split a nested list into further list?
body: <p>I have a nested list that is similar to this and sorted on time ascending:</p>
  
  <pre><code>[[TIME, 'b', 0],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 10],
  [TIME, 'b', 0],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 10],
  [TIME, 'b', 0],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 1],
  [TIME, 'b', 10]]
  </code></pre>
  
  <p>The third item in each list is either a 0, 1 or 10. 0 represents the start, 1 represents moving and 10 represents the finish. How can I split this into a further nested list so I would end up with a list of journeys similar to this:</p>
  
  <pre><code>[[[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]],
  [[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]],
  [[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]]]
  </code></pre>