Created
May 31, 2017 23:46
-
-
Save AndrewC-B/ad056f089aad0f10029a719f97871be6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
path_to_source = "input.txt" | |
output_directory = "output/" | |
with open(path_to_source, 'r') as source: | |
lines = source.readlines() | |
for i, line in enumerate(lines): | |
with open("{}file_{}.txt".format(output_directory, i), 'w+') as output: | |
output.write(line) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment