Python 'in' Operator Inexplicably Failing
<p>My simple script to check for a certain word in files seems to be failing, and I cannot seem to explain it through documentation or searching. The code is below. I believe I have narrowed it down to the 'in' operator failing by printing the code itself and finding the word that I am looking for. If curious, this script is to find certain keywords in the Quake source code, since I'd rather not look through 30+ full source files. Any help would be appreciated, thanks!</p>

<pre><code>import os

def searchFile(fileName, word):
    file = open(os.getcwd() + "\\" + fileName,'r')
    text = file.readlines()

    #Debug Code
    print text

    if(word in text):
        print 'Yep!'
    else:
        print 'Nope!'
</code></pre>
