This is my function:
def read_text():
quotes = open("C:\blop\movie_quotes.txt")
contents_of_file = quotes.read
print(contents_of_file)
quotes.close
read_text()
I am just trying to read a file and print the text within the file, but I get this error:
Traceback (most recent call last):File "C:/Python27/detect_profanity.py", line 6, in <module>
read_text()File "C:/Python27/detect_profanity.py", line 2, in read_text
quotes = open("C:\blop\movie_quotes.txt")
IOError: [Errno 22] invalid mode ('r') or filename: 'C:\x08lop\\movie_quotes.txt'
How can I fix it?