title: Writing List of Strings Outputted by Function to a File
body: <p>I have a list of sentences that are the output of my function. They look like:</p>
  
  <pre><code>["['A', 'little', 'girl', 'spanks', 'her', 'blonde', 'hair', 'Of', 'a', 'twitching', 'nose', 'A', 'cigarette', 'butt.', '$']",
   "['From', 'another', 'town.', '$', 'The', 'arriving', 'train', 'All', 'my', 'sweaty', 'face', 'In', 'a', 'pine', 'tree.']",
   "['In', 'a', 'heavy', 'fall', 'of', 'flakes', 'And', 'timing', 'its', 'wing,', '\\xe2\\x80\\x93', 'A', 'leaf', 'chases', 'wind']",....
  
  "['As', 'green', 'melon', 'splits', 'open', 'And', 'cools', 'red', 'tomatoes!', '$', 'In', 'a', 'breath', 'of', 'an']"]
  </code></pre>
  
  <p>Please excuse the words in the sentences. They're just experiments. I want to write these out to a file as just plain sentences.</p>
  
  <p>I tried this:</p>
  
  <pre><code>def writeFile(sentences):
      with open("result.txt", "w") as fp:
          for item in sentences:
              fp.write("%s\n" % item)
  </code></pre>
  
  <p>But my output looks like this:</p>
  
  <pre><code>['A', 'little', 'girl', 'spanks', 'her', 'blonde', 'hair', 'Of', 'a', 'twitching', 'nose', 'A', 'cigarette', 'butt.', '$']
  ['From', 'another', 'town.', '$', 'The', 'arriving', 'train', 'All', 'my', 'sweaty', 'face', 'In', 'a', 'pine', 'tree.']
  </code></pre>
  
  <p>I am coding in Python 2. Can someone help?</p>