Created
December 15, 2010 19:41
-
-
Save joshz/742490 to your computer and use it in GitHub Desktop.
combine multiple files with filenames starting with capital letters
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
with open('dict.txt', 'w') as outfile: | |
for char in range(ord('A'), ord('Z')+1): | |
outfile.write(open('subdir/' + chr(char) + ' sdict.txt', 'r').read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment