I have both txt and python file in the same folder and I am trying this :
f =open('sample.txt')
data = f.read()
print(data)
f.close()
but still, I am facing the error.
I don't want to write the full path of the file is there any way to fix this error.