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:
doc=open("bradley.txt","r",encoding="UTF-8")
doc.readlines()
doc.close()
I get the error.TypeError: an integer is required (got type str)
I removed the "r" so that my code isdoc=open("bradley.txt",encoding="UTF-8")
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?