title: How to printing the words in a string?
body: <p>I want to do the following in my code:</p>
  
  <ol>
  <li>Print each words of a string in a new line  </li>
  <li>Print each character in a new line</li>
  </ol>
  
  <p>I have been able to achieve the second part using the following code:</p>
  
  <pre><code>s2 = "I am testing"
  for x in s2:
      print x
  </code></pre>
  
  <p>I am having trouble achiving the first part . I have written the following code which recognizes where there is space in the string.</p>
  
  <pre><code>for i in s2:
      if not(i.isspace()):
          print i
      else:
          print "space"
  </code></pre>
  
  <p>Also tried the below which strips all the spaces of the string: </p>
  
  <pre><code>s3 = ''.join([i for i in s2 if not(i.isspace())])
  print s3
  </code></pre>
  
  <p>But still not achieving my desired output, which should be something like: </p>
  
  <pre class="lang-none prettyprint-override"><code>I
  am
  testing
  </code></pre>