Companies Home Search Profile

Handling Missing Keys With the Python defaultdict Type

Focused View

Christian Mondorf

42:59

317 View
  • 1 intro.mp4
    03:02
  • 2 handling missing keys.mp4
    03:31
  • 3 understanding defaultdict.mp4
    05:10
  • 4 using defaultdict.mp4
    09:20
  • 5 diving deeper Fix.mp4
    10:34
  • 6 passing arguments.mp4
    07:27
  • 7 summary.mp4
    03:55
  • Defaultdict Slides.pdf
  • defaultdict code.py.zip
  • Description


    The Python defaultdict type behaves almost exactly like a regular Python dictionary, but if you try to access or modify a missing key, then defaultdict will automatically create the key and generate a default value for it. This makes defaultdict a valuable option for handling missing keys in dictionaries.

    In this course, you’ll learn:

    What You'll Learn?


    • How to use the Python defaultdict type for handling missing keys in a dictionary
    • When and why to use a Python defaultdict rather than a regular dict
    • How to use a defaultdict for grouping, counting, and accumulating operations

    More details


    User Reviews
    Rating
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category
    Christian Mondorf
    Christian Mondorf
    Instructor's Courses

    Christian is an avid Pythonista and video instructor at Real Python.

    Learn Python online: Python tutorials for developers of all skill levels, Python books and courses, Python news, code examples, articles, and more.
    • language english
    • Training sessions 7
    • duration 42:59
    • Release Date 2023/01/05

    Courses related to Python