title: How do I trim the number of words in Python?
body: <p>For example...</p>
  
  <pre><code>s = 'The fox jumped over a big brown log.'
  
  k = FUNCTION(s,4)
  
  k should be... "The fox jumped over"
  </code></pre>
  
  <p>I can write my own function that splits on whitespace, cuts the list and then joins the list. But that is too much work.</p>
  
  <p>Anyone else knows a simpler way?</p>