Created
May 22, 2021 21:42
-
-
Save x1001000/4cae0d70203dc13f2ac7ad3a75095a5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open(input()) as f: | |
old = input() | |
new = input() | |
outlines = [] | |
print('=== Before the replacement') | |
for readline in f.readlines(): | |
print(readline.strip()) | |
outlines.append(readline.replace(old, new)) | |
print('=== After the replacement') | |
for outline in outlines: | |
print(outline.strip()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment