title: How do i get every second word in a string including the first one?
body: <p>Define a function called print_skip that accepts a string and prints out every second word in the string, starting with the first word.  A word is treated as any sequence of letters that is separated from other letters by white space.  You may assume a string is passed as a parameter.</p>
  
  <p>thats the problem i'm having.</p>
  
  <p>i tried to put it in a a list and index it from there and it works fine and passed most of the test that the website gives except one. </p>
  
  <p>print_skip('Hello    world!\nHow\nare\nyou!') and the excepted output is Hello How you. my code just crash when this happens</p>
  
  <pre><code>def print_skip(text):
  only_letters = ''
  new_words = []
  for c in text:
      if(c.isalpha() or c==' '):
          only_letters += c
  for x in only_letters.split():
      new_words.append(x)
  for i in range(0,len(new_words)+1,2):
      print(new_words[i])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8kGRp.png" rel="nofollow noreferrer">testing error</a></p>
  
  <p><a href="https://i.stack.imgur.com/PO58w.png" rel="nofollow noreferrer">my code so far </a></p>
  
  <p><a href="https://i.stack.imgur.com/ykpm3.png" rel="nofollow noreferrer">this is the original question</a></p>