On Sun, Sep 27, 2009 at 11:24:07AM -0400, duraira1 at msu.edu wrote: > I am trying to find the index of "\n.\n" in the data received..but I am getting a value error.. > > ????? print? data1.index("\n.\n")... > ValueError: substring not found Here you can either catch the exception OR use 'find'. --titus -- C. Titus Brown, ctb at msu.edu