Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
It`s not the shortest solution solution in Creative category for The Most Wanted Letter by piotr.sawicki
def checkio(text):
list =[]
list_1 = []
for i in range(len(text)): # Creates a list, which contain counter for each character
if text.lower()[i].isalpha():
list.append((text.lower()).count(text.lower()[i]))
else: list.append(0)
for i in range(len(text)): # Creates a list, which contain only the most wanted characters (without sorting)
if list[i] == max(list):
list_1.append((text.lower()[i]))
return sorted(list_1)[0]
Oct. 21, 2017