Skip to content

Instantly share code, notes, and snippets.

@apisznasdin
Created August 27, 2015 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apisznasdin/cdf21f1f425ae23bdcb0 to your computer and use it in GitHub Desktop.
Save apisznasdin/cdf21f1f425ae23bdcb0 to your computer and use it in GitHub Desktop.
file_1 = open("input.txt", "r")
file_2 = open("output.txt","r+")
mylist = sorted(file_1.read().split(','), key=str.lower)
for line in mylist:
file_2.write(","+line)
file_1.close()
file_2.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment