"noro" <amit.man at gmail.com> schreef in bericht news:1157973527.817462.207420 at h48g2000cwc.googlegroups.com... > Is there a more efficient method to find a string in a text file then: > > f=file('somefile') > for line in f: > if 'string' in line: > print 'FOUND' > yes, more efficient would be: grep (http://www.gnu.org/software/grep/)