title: Python AttributeError: NoneType object has no attribute 'close'
body: <p>I am learning python and I wrote a script that copies the content of one text file to another.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>from sys import argv
  out_file = open(argv[2], 'w').write(open(argv[1]).read())
  out_file.close()
  </code></pre>
  
  <p>I get the AttributeError listed on the title. Why is it that wen I call the write method on open(argv[2], 'w') the out_file is not assigned a File type?</p>
  
  <p>Thank you in advance</p>