Skip to content

Instantly share code, notes, and snippets.

@JKirchartz
Created November 17, 2011 20:55
Show Gist options
  • Save JKirchartz/1374488 to your computer and use it in GitHub Desktop.
Save JKirchartz/1374488 to your computer and use it in GitHub Desktop.
Python one-liner to print a sorted list of unique characters in a string; just change the input file from "test.html" to whatever file you need. This is great for optimizing google webfonts
print 'Unique Characters: %s' % ''.join(sorted(set(open("test.html", "r").read())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment