Introduction: Dictionaries? 📖

Congratulations on making it past the halfway point in the course! 💪

This week we consider dictionaries. Not the books of definitions that might be the first thing to come to your mind, but rather Python dictionaries which are a more convenient kind of list, where the index doesn't have to be a number, but can be other Python types as well. So where lists had to look like,

card[1] = 48
student[48] = 'Topper, Tim'

dictionaries can look like,

people['Topper'] = 'Topper, Tim'
wisdom[True] = 'Not everything that counts can be counted.'

That's really the only new thing this week, but dictionaries can be used in lots of ways. In particular lists and dictionaries can be combined in interesting ways, so the resources provide several examples you will want to read and_work your way through.

  1. Dictionaries
  2. Dictionary "derivation"
  3. What can you do with a dictionary?
  4. Example: Word Frequencies
  5. Example: Scrabble Scoring
  6. Example: Book Database
  7. Example: A list of dictionaries