title: Keep only first and last element of sublists in python
body: <p>I have a list such as : <code>[[0,1,2],[3,4,5],[6,7,8],[9,10,11],[12,13,14],[15]]</code></p>
  <p>How can I select within each sublist only the first and last element, such as :</p>
  <pre><code>expected_list=[[0,2],[3,5],[6,8],[9,11],[12,14],[15]]
  </code></pre>