Advertisement
DeaD_EyE

is_isogram

Mar 13th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # https://en.wikipedia.org/wiki/Isogram
  3.  
  4. from collections import Counter
  5. from functools import reduce
  6.  
  7. def is_isogram(word):
  8.     counter = Counter(word.lower())
  9.     return reduce(lambda x, y: x == y, counter.values())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement