snip...
>
>for counter, line in enumerate(fileIN):
>newline = line.replace(oldstring, newstring)
>if newline != line:
>print 'match at line', counter+1
>fileOUT.write(newline)
"enumerate" - haven't seen that before. Nice!
Thanks
--
http://mail.python.org/m
goldtech <[EMAIL PROTECTED]> wrote:
> Question1: The replace method - If a string does not have the target
> replacement "newstring", then newline equals oldstring? Ie. oldstring
> is not changed in any way? Seems to be what I observe but just want to
> confirm this.
Yes.
>
> Question2: I'm us