I am trying to write code that compares variable b with value retrieved from text file using linecache.getline
The problem is it will never print our "ITS WORKING" because the values never match, even if they do :-(
THE TEXT FILE: In the text file there is only one character and its "a"
Here is the code:
import linecache
b="a"
a=linecache.getline("TextFile.txt",1)
if a==b:
print("ITS WORKING")