Find the character that appears most often in a string, with ties broken by first occurrence.
Constraints
Example
>>> most_common_character('aabbbcc')
'b'
>>> most_common_character('abracadabra')
'a'
>>> most_common_character('hello world')
'l'
>>> most_common_character('aabbcc')
'a'
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints