Your question is Most Frequent Character. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Quantiphi's language-processing pipelines may need a quick summary of incoming text. Write a function that returns the character occurring most frequently in a non-empty string.
Character comparison is case-sensitive, and every character counts, including spaces, punctuation, and digits. If multiple characters have the same highest frequency, return the one that appears first in the original string.
s.s.def most_frequent_char(s):