Dictionaries

Learn specialized container datatypes: defaultdict and OrderedDict.

Introduction

A dictionary is a built-in data structure that holds items as key: value pairs. To index the dictionary, we can’t use a range of numbers. Keys (only immutable types allowed) serves the purpose of indexing. It’s an unordered structure.

Get hands-on with 1400+ tech skills courses.