Skip to content

Instantly share code, notes, and snippets.

@armanbilge
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save armanbilge/8ff90300eed27f6d7446 to your computer and use it in GitHub Desktop.

Select an option

Save armanbilge/8ff90300eed27f6d7446 to your computer and use it in GitHub Desktop.
import string
from collections import Counter
def leastFrequentLetters(s):
C = Counter(c for c in s.lower() if c in string.ascii_lowercase)
return ''.join(k for k in string.ascii_lowercase if C[k] == min(C.itervalues()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment