
Gold Ship want to hold a contest to see who can count words the fastest. Although she knows that no one could count faster than her, her trainer has a secret weapon, and it is you! Please help Trainer-san write a program to beat Gold Ship.
The contest contents is as follows: Given a sentence, turn the words into their lowercase version and return a dictionary containing the count of those words.
Seeing you struggle, Trainer-san gave you this slip of code and a hint to help you:
def count(inStr: str)->dict:
#Write your code here
Hint: Check if key exist in dictionary
With the above code, write a function named "count" that takes a string as a parameter to complete the code and beat Gold Ship!
Comic credit: @NeitheYAGI
Write a function take a string as a parameter.
The words in the string are separated by spaces and will only contain uppercase and lowercase Latin characters.
And return a dictionary containing the count of lowercased version of the words.