Advertisement
Guest User

Untitled

a guest
Jun 5th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def load(self, f_in_1, f_in_2, f_out_1, f_out_2):
  2.     file_pairs = [(f_in_1, f_out_1), (f_in_2, f_out_2)]
  3.     for pair in file_pairs:
  4.         with open(pair[0]) as f_in, open(pair[1], 'w') as f_out:
  5.             for line in f_in:
  6.                 parts = line.split()
  7.                 f_out.write('{{{}:{}}}\n'.format(parts[2], parts[0]+parts[3:7]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement