On Sep 3, 1:45 am, Sean DiZazzo <half.ital...@gmail.com> wrote: > string.find() returns the index at which the given word is found > within the string. If the string is not found it returns -1. So, no > matter what you do, string.find() will evaluate to "True"
It will evaluate as false if the substring is found at the beginning (position 0). > You could use it like this: if file_str.find("Geometry") != -1: > > but you probably want to use: if "Geometry" in file_str: This is good advice, however. John -- http://mail.python.org/mailman/listinfo/python-list