Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
String methods solution in Clear category for The Most Wanted Letter by stclair.daniel
import string
def checkio(text):
text = text.lower()
counts = [(text.count(letter), letter) for letter in text
if letter not in string.punctuation
and letter not in string.whitespace
and letter not in string.digits]
max_count = max(counts)[0] #highest count
res = [item for item in counts if item[0] == max_count] #all items with equal highest count
return min(res)[1] #highest count, lowest alphabetical order
March 2, 2015
Comments: