• The Most Wanted Letter - Need Help with this

Question related to mission The Most Wanted Letter

 

Hello,

I have written the below code and when executed it shows the output correctly as show below:


def checkio(text: str) -> str: print("we are starting the program") dict = {} text = str.lower(text) print("The result of lowering the cases is: " +text) for c in text: if str.isalpha(c): dict[c] = text.count(c) print("The dictionary object is created:") print(dict) for key, value in dict.items(): print('Key: %s' % key) print('value: %s' % value) maxval = max(dict.values()) print(max(dict.values())) maxx = {} for key, value in dict.items(): if (value >= maxval): maxx[key] = value print("The resulting dictionary is: ") print(maxx) print("The ultimate winner is:") print(min(maxx))

checkio('Hello World!')
assert checkio('Hello World!') == "l" (If I use assert, I see an assertion error.)


But when I use assert it is showing assertion error. Please help me understand this. Thanks in advance.

Thank you Bharat