title: Python get the x first words in a string
body: <p>I'm looking for a code that takes the 4 (or 5) first words in a script.
  I tried this:</p>
  
  <pre><code>import re    
  my_string = "the cat and this dog are in the garden"    
  a = my_string.split(' ', 1)[0]
  b = my_string.split(' ', 1)[1]
  </code></pre>
  
  <p>But I can't take more than 2 strings:</p>
  
  <pre><code>a = the
  b = cat and this dog are in the garden
  </code></pre>
  
  <p>I would like to have:</p>
  
  <pre><code>a = the
  b = cat
  c = and
  d = this
  ...
  </code></pre>