Велина обнови решението на 16.03.2014 23:59 (преди над 10 години)
+from collections import Counter
+from functools import cmp_to_key
+from itertools import groupby
+
+alphabet = set(['а', 'б', 'в', 'г', 'д', 'е', 'ж', 'з', 'и', 'й', \
+ 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', \
+ 'ц','ч', 'ш', 'щ', 'ь', 'ъ', 'ю', 'я'])
+
+def is_pangram(sentence):
+ return alphabet.issubset(set(sentence.lower()))
+
+def char_histogram(text):
+ return Counter(text)
+
+def sort_by(func, arguments):
+ return sorted(arguments, key = cmp_to_key(func))
+
+def group_by_type(dictionary):
+ key_types = set(type(key) for key in dictionary.keys())
+ return dict((key_type, dict((key, dictionary[key]) for key in dictionary.keys() if type(key) == key_type)) for key_type in key_types)
+
+def anagrams(words):
+ return [list(anagrams) for _, anagrams in groupby(sorted(words, key=sorted), key = set)]