RosettaCodeData/Task/Globally-replace-text-in-several-files/Python/globally-replace-text-in-several-files.py

5 lines
131 B
Python
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
import fileinput
for line in fileinput.input(inplace=True):
print(line.replace('Goodbye London!', 'Hello New York!'), end='')