Brad wrote:
alex23 wrote:

open('outfile','w').writelines(l.replace('Volume 940','Volume 950') for l in open('myfile','r'))

Ahh yes, perhaps string function are simpler to use in this case.
Thanks Alex!

If, if you have to change the file repeatedly, make it a template (either % or the new .format variety) and substitute in the value you want.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to