title: Python 2: AttributeError: 'file' object has no attribute 'strip'
body: <p>I have a <strong>.txt</strong> document called <strong>new_data.txt</strong>. All data in this document separated by dots. I want to open my file inside python, split it and put inside a list.</p>
  
  <pre><code>output = open('new_data.txt', 'a')
  output_list = output.strip().split('.')
  </code></pre>
  
  <p>But I have an error:</p>
  
  <pre><code>AttributeError: 'file' object has no attribute 'strip'
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>Note: My program is on Python 2</p>