def wc(name):
"""Count words in a file.
The parameter is the name of a file to count.
Returns a dictionary giving the counts for each word found.
Words are delimited by whitespace. This is not perfect;
for example, in 'cats, not dogs" we get a word 'cats,'."""
h = {}
return h
Python String
API and Array API May
prove helpful in doing this