Guest User

Untitled

a guest
Feb 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. data = []
  2. with open('file_src.py', 'r') as f:
  3. for line in f.readlines():
  4. data.append(line)
  5. #
  6. # process the data
  7. #
  8. with open('dest_file.py', 'w') as f:
  9. f.writelines(data)
  10.  
  11. # or
  12. # write_data = ''.join(data)
  13. # with open('dest_file.py', 'w') as f:
  14. # f.writelines(write_data )
Add Comment
Please, Sign In to add comment