Python Reading
- Read the chapter entitled Dictionaries from section "Sparse Matrices" through section "Glossary"
Key Ideas
- A dictionary handles sparse data well. For example, consider keeping track of how many times a word occurs in a novel such as The Catcher in the Rye. Only words that appear one or more times need to be stored.
In-Class Activity
- Download and experiment with sparse.py until you understand how it works.
Active Learning
- Modify sparse.py so that function most_frequent works.