Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import re
  2.  
  3. def format_file(file1, file2):
  4. output = re.sub(r'STUFF_TO_REPLACE', r'STUFF_TO_PUT_IN_PLACE', file1.read() )
  5. file2.write(output)
  6.  
  7. format_file(open('input.txt', 'r'), open('output.txt', 'w'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement