Skip to content

Instantly share code, notes, and snippets.

@joshz
Created December 15, 2010 19:41
Show Gist options
  • Save joshz/742490 to your computer and use it in GitHub Desktop.
Save joshz/742490 to your computer and use it in GitHub Desktop.
combine multiple files with filenames starting with capital letters
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