# Homework 23, challenge: Word frequency. # # Given a list of words (some repeated), build a dict that maps each # unique word to the number of times it appeared. Print every # (word, count) pair, one per line. # # Hint: use `counts.get(word, 0) + 1` to start from 0 the first time # a word is seen. # # Run with: python exercises/23/homework/04-word-frequency.py words = ["apple", "banana", "apple", "cherry", "apple", "banana"] # Your code goes here: