• It works outside checkio and the example

Question related to mission The Most Wanted Letter

 

Can't find why this will not pass the checks.

def checkio(text: str) -> str: freq = {} for each in text: each = each.lower() if each in freq: freq[each] += 1 elif each.isalpha(): freq[each] = 1 maxkeys = [key for key, value in freq.items() if value == max(freq.values())] if len(maxkeys) == 1: return maxkeys else: return min(maxkeys)