Module 8: Dictionaries & Tuples
Master Python's key-value data structures and learn when immutability matters
Your Progress
Complete the lessons in order, then test yourself with practice problems and the module quiz.
Learning Objectives
By the end of this module, you will be able to:
- Create dictionaries and access values using keys
- Add, update, and remove key-value pairs from dictionaries
- Use dictionary methods like
keys(),values(),items(),get(), andpop() - Iterate over dictionaries using loops
- Build and access nested dictionaries
- Create tuples and understand why immutability matters
- Unpack tuples and use tuple methods
- Choose the right data structure (list, tuple, or dictionary) for any task
Lessons
Creating and Using Dictionaries
Learn how to create dictionaries with key-value pairs, access values by key, add and update entries, handle KeyError, and use the get() method.
~35 minutesDictionary Methods
Explore powerful dictionary methods including keys(), values(), items(), update(), pop(), and clear(). Learn to iterate over dictionaries and build nested structures.
~35 minutesTuples and Immutability
Discover tuples: Python's immutable sequences. Learn how to create them, unpack values, use tuple methods, and understand why immutability is a feature, not a limitation.
~30 minutesChoosing the Right Data Structure
Compare lists, tuples, and dictionaries. Learn when to use each one based on your data, performance needs, and real-world scenarios.
~30 minutes