title: Python slice first and last element in list
body: <p>Is there a way to slice only the first and last item in a list?</p>
  
  <p>For example; If this is my list:</p>
  
  <pre><code>&gt;&gt;&gt; some_list
  ['1', 'B', '3', 'D', '5', 'F']
  </code></pre>
  
  <p>I <em>want</em> to do this (obviously <code>[0,-1]</code> is not valid syntax):</p>
  
  <pre><code>&gt;&gt;&gt; first_item, last_item = some_list[0,-1]
  &gt;&gt;&gt; print first_item
  '1'
  &gt;&gt;&gt; print last_item
  'F'
  </code></pre>
  
  <p>Some things I have tried:</p>
  
  <pre><code>In [3]: some_list[::-1]
  Out[3]: ['F', '5', 'D', '3', 'B', '1']
  
  In [4]: some_list[-1:1:-1]
  Out[4]: ['F', '5', 'D', '3']
  
  In [5]: some_list[0:-1:-1]
  Out[5]: []
  ...
  </code></pre>