title: How to slice a list in Python
body: <p>Suppose I have a list with X elements</p>
  
  <pre><code>[4,76,2,8,6,4,3,7,2,1...]
  </code></pre>
  
  <p>I'd like the first 5 elements.  Unless it has less than 5 elements.</p>
  
  <pre><code>[4,76,2,8,6]
  </code></pre>
  
  <p>How to do that?</p>