Here is the test I am running:

```
accget = StringVar()
E2 = Entry(pm, bd =1, textvariable = accget).grid(row=1, column=1)
B2 = Tkinter.Button(pm, text ="Access saved passwords", 
                        command = accesspass).grid(row=1,column=3)

def accesspass():
    for line in reversed(open("passfile.txt", "r").readlines()):
        if str(accget) in line:
            print("yes")   
        else:
            print("no")

```

The set up is in a GUI and when the user fills E2 and presses B2, the programm iterates passfile.txt from the last line up and is meant to print yes if the string is in a line. However, even when a word is in a line or I have placed the whole content of the line in the field, the test always returns false and i get no for everyline. 

Can somebody explain why this might be?