I tried giving path of the text file as an argument in open function but it throws an error.
2/28/2019 12:15:50 PM
open(r'filename with complete path','r')
Using r in front of filename/path, will consider the path in raw text and works.. without this, I also faced errors while opening file with full path..
with open("text_file.txt", "r") as f:
If you wish to write to the file, switch the "r" (read) to "w" (write)
First Set the directory of the file...
And then execute with
#to both read and write
Send us a message