Skip to content

Instantly share code, notes, and snippets.

@IaroslavR
Last active April 29, 2018 15:36
Show Gist options
  • Save IaroslavR/3d8692e2a11e1ef902d2d8277eb88cb8 to your computer and use it in GitHub Desktop.
Save IaroslavR/3d8692e2a11e1ef902d2d8277eb88cb8 to your computer and use it in GitHub Desktop.
with open("inFile.txt", 'r') as src, \
open("outFile1.txt", 'w') as out_1, \
open("outFile2.txt", 'w') as out_2:
for line in src.readlines():
out_1.writelines(line)
out_2.writelines(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment