Станислав обнови решението на 12.03.2014 21:59 (преди над 10 години)
+from itertools import groupby
+from functools import cmp_to_key
+
+
+def is_pangram(text):
+ return set('абвгдежзийклмнопрстуфхцчшщъьяю').issubset(set(text.lower()))
+
+
+def char_histogram(text):
+ return {char: text.count(char) for char in text}
+
+
+def sort_by(comparator, sequence):
+ return sorted(sequence, key=cmp_to_key(comparator))
+
+
+def group_by_type(dictionary):
+ return {t: {k: dictionary[k] for k in keys}
+ for t, keys in groupby(dictionary.keys(), type)}
+
+
+def anagrams(words):
+ return [list(v) for k, v in groupby(words, set)]