Programming in Python
0 of 222 complete

Section 9: Dictionaries · Notes

Section notes

  • A dictionary maps keys to values, such as {'name': 'Ali'}.
  • get() returns a default when a key is missing: the usual counting pattern.
  • items() gives key-value pairs to loop over.
  • A dictionary is the fastest way to look a value up by its key.

Your progress is saved in this browser. Accounts are coming so it follows you across devices.