title: How to open text documents in python
body: <p>I have written a text document in notepad. The encoding is UTF-8. I have saved the text document as bradley.
  I want to read the document using python 3.4
  here is my code:</p>
  
  <pre><code>doc=open("bradley.txt","r",encoding="UTF-8")
  doc.readlines()
  doc.close()
  </code></pre>
  
  <p>I get the error.TypeError: an integer is required (got type str)
  I removed the "r" so that my code is<code>doc=open("bradley.txt",encoding="UTF-8")</code>
  when i run it...The IDLE gives me nothing. what i was expecting is that i get the contents of the file. How can i achieve that?</p>