In Python, I have an issue where whenever I use the getline()
function from linecache
module, it won't work at all. Say this was what I had on a text document named hi.txt
:
Hi
And say this is what I had on a python program in the same folder/directory:
import linecache
print (linecache.getline("hi.txt", 0))
It would print nothing, just some blank lines of nothing.