I found this solution from stackoverflow but will i have to add this piece of code every time i write a code to perform read/write operations. Or is there any long term solution available for this ?
import os
path = "E:\Python\learn"
os.chdir(path)
f = open('text.txt')
data = f.read()
print(data)
f.close()