Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 896 Bytes

File metadata and controls

28 lines (22 loc) · 896 Bytes

Module 024: Dictionaries: Advanced (Nesting, Methods, Comprehensions)

Phase: 3. Data Structures
Estimated Time: 2 hours
Milestone: No

Overview

Build on basic dictionary skills with nesting, powerful dictionary methods, comprehensions, merging, and defaultdict.

Topics

  • Nested dicts
  • Dict methods: keys(), values(), items(), update(), pop(), setdefault(), fromkeys()
  • Dict comprehensions
  • Merging dicts with | operator (Python 3.9+)
  • defaultdict (brief introduction)

Learning Objectives

  • Work with nested dictionaries (dicts within dicts)
  • Use advanced dict methods for manipulation
  • Write concise dict comprehensions
  • Merge dictionaries using the | operator
  • Use defaultdict for default values

Prerequisites

  • Modules 000–023

Next Module

Module 025: Mutability vs Immutability