Created
May 12, 2014 16:44
-
-
Save P7h/8c54f0d9adb2efdfb60a to your computer and use it in GitHub Desktop.
Python utility to create missing tsv files [numbered 1 to 78] in a directory.
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
import os | |
folder_name = 'D:/issue/' | |
for i in range(1, 79): | |
fileName = folder_name + str(i) + ".tsv" | |
if not os.path.isfile(fileName): | |
with open(fileName, 'w') as f: | |
f.write('word\tcount\n') | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment