You are writing a diary and want to see which words you use most. Write word_tally(sentence) to return a dict of each word to how often it appears. Ignore case (make words lowercase), strip .,!? off the ends of words, and keep the order words first appear. An empty sentence gives {}.
word_tally("The sun is up. The sky is blue!")→{'the': 2, 'sun': 1, 'is': 2, 'up': 1, 'sky': 1, 'blue': 1}word_tally("Go, go, GO!")→{'go': 3}def word_tally(sentence):
tally = {}
for word in sentence.split():
# your code here: lowercase it, strip .,!?
# then count it in tally
pass
return tally
Run tries the examples. When they look right, Submit.