title: Why am I getting a AttributeError: 'NoneType' object has no attribute 'read'?
body: <pre><code>print "Enter the name of the file", 
  file= open(raw_input(":"),'w').write(raw_input("Enter the content:"))
  print file.read()
  </code></pre>
  
  <p>In response I am getting <code>AttributeError: 'NoneType' object has no attribute 'read'</code>. Please can anyone help.</p>