Skip to content

Instantly share code, notes, and snippets.

@ptigas
Created February 3, 2012 16:34
Show Gist options
  • Save ptigas/1730997 to your computer and use it in GitHub Desktop.
Save ptigas/1730997 to your computer and use it in GitHub Desktop.
letter frequency
from itertools import groupby
[(i, len(list(j))) for i,j in groupby(sorted('hullabaloo'))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment