Created
December 30, 2017 23:14
-
-
Save AlexBaranowski/cd7188479c5a4fe3bceed893e7063355 to your computer and use it in GitHub Desktop.
Very simple merging two files with same line - idea is to make tuple that will be hardcoded.
This file contains 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
with open('some_args') as f1: | |
with open('some_names') as f2: | |
with open('out', 'w') as f3: | |
args = f1.readlines() | |
name = f2.readlines() | |
print('lenghts :', len(args), len(name)) | |
for i in range(len(args)): | |
f3.write('(\'{}\', \'{}\'),\n'.format(args[i].strip(), name[i].strip())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment