[Tutor] String or Re

Terry Carroll carroll at tjc.com
Fri Jul 13 20:58:18 CEST 2007


On Fri, 13 Jul 2007, Terry Carroll wrote:

> Try this:
> 
> for line in infile:
>    if line.find("10.52.10.11") != -1:
>       outfile.write(line)

No, don't.  Alan's solution is much nicer.



More information about the Tutor mailing list