L&T Technology Services processes character-based identifiers and diagnostic labels. Given a non-empty string s, find the character that occurs most frequently.
Character comparison is case-sensitive, and every character counts, including spaces, digits, and punctuation. If multiple characters have the same maximum frequency, return the one whose first occurrence appears earliest in s.
Implement max_occurring_char(s):
s, a non-empty string.s.def max_occurring_char(s):