Light Mode
Dark Mode
Bad result check
The site doesn't seem to give the correct result to my code giving it the wrong answer when it shouldn't be the case.

From: http://www.checkio.org/mission/most-wanted-letter/solve/

HTTP\_USER\_AGENT:

    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

My Code:

    import collections
    
    
    def checkio(text):
        text = text.lower()
        letters = "".join(char for char in text if char.isalpha())
        
        most_common = collections.Counter(letters).most_common(1)[0][0]
        return most_common
Created: July 14, 2014, 3:08 p.m.
Updated: July 14, 2014, 9:34 p.m.
0
8
User avatar
RuiLima