Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- def format_file(file1, file2):
- output = re.sub(r'STUFF_TO_REPLACE', r'STUFF_TO_PUT_IN_PLACE', file1.read() )
- file2.write(output)
- format_file(open('input.txt', 'r'), open('output.txt', 'w'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement