def the_most_wanted_letter(text: str) -> str: temp = {} for word in text.lower(): if word.isalpha(): temp.setdefault(word, 0) temp[word] += 1 return sorted(temp.items(), key=lambda x: (-x[1], x[0]))[0][0]
Непонятен конкретно вот этот момент
key=lambda x: [b](-x[1][/b], x[0])