replace a line in a text file

Luis Solís lsolis at mu.intecsa-inarsa.es
Fri Jun 11 04:20:04 EDT 2004


I need open a text file, for example

1
2.3 4.5
4.5

open file mode=x
read the file line by line
if some in line i == xx:
    replace line i by newline
close file

Thanks in advance





More information about the Python-list mailing list