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)
Created at: 2022/08/23 21:37; Updated at: 2022/08/24 07:32