I open a file using python to find whether a predefined set of words are present in the opened file or not. I took the predefined set of words in a list and opened the file
You can do a few things
Check out the pydocs for file - http://docs.python.org/release/2.5.2/lib/bltin-file-objects.html