title: AttributeError: 'file' object has no attribute 'append'
body: <p>I'm really new to this whole thing, so excuse the maybe stupid question, but I am too stupid to find the answer myself.</p>
  
  <p>I've got a list with links URLs and timestamps and want to shorten the URLs and save the result to a new file.
  But running</p>
  
  <pre><code>file = open('history.csv','r')
  clean = open('historyclean.csv','a')
  
  for x in file:
      b = x.rsplit('/',1)
      b.pop()
          clean.append(b)
  </code></pre>
  
  <p>results in</p>
  
  <pre><code>    AttributeError: 'file' object has no attribute 'append'
  </code></pre>
  
  <p>and I can't find out why.
  I am using Python 2.7, if relevant</p>
  
  <p>Thanks in advance.</p>