title: Tokenize words in a list of sentences Python
body: <p>i currently have a file that contains a list that is looks like </p>
  
  <pre><code>example = ['Mary had a little lamb' , 
             'Jack went up the hill' , 
             'Jill followed suit' ,    
             'i woke up suddenly' ,
             'it was a really bad dream...']
  </code></pre>
  
  <p>"example" is a list of such sentences , and i want the output to look as :</p>
  
  <p><code>mod_example = ["'Mary' 'had' 'a' 'little' 'lamb'" , 'Jack' 'went' 'up' 'the' 'hill' ....]</code>
  and so on. 
  I need the sentences to be separate with each word tokenized so that i can compare each word from a sentence of <code>mod_example</code> (at a time using for loop) with a reference sentence.</p>
  
  <p>I tried this :</p>
  
  <pre><code>for sentence in example:
      text3 = sentence.split()
      print text3 
  </code></pre>
  
  <p>and got the follwing as output : </p>
  
  <pre><code>['it', 'was', 'a', 'really', 'bad', 'dream...']
  </code></pre>
  
  <p><strong>How do I get this for all the sentences?</strong> 
  it keeps overwriting . and yes , also mention whether my approach is right?
  this should remain a list of sentences with the words tokenized.. thanks</p>