Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
collections.defaultdict solution in Clear category for The Most Wanted Letter by David_Jones
from collections import defaultdict
def checkio(text):
d = defaultdict(int)
for ch in text.lower():
if ch.isalpha():
d[ch] += 1
return max(d.items(), key=lambda x: (x[1], -ord(x[0])))[0]
May 2, 2019
Comments: