Phase: 3. Data Structures
Estimated Time: 2 hours
Milestone: No
Learn about dictionaries, Python's key-value mapping data structure. Master creating, accessing, and iterating over dictionaries.
- Creating dicts with
{} - Key-value pairs
- Accessing values with
[]and.get() - Modifying and adding entries
- Dict iteration:
keys(),values(),items() len()and theinoperator- Dict membership testing
- Create dictionaries using curly braces and key-value syntax
- Access values safely using square brackets and
.get() - Add and modify entries in a dictionary
- Iterate over keys, values, and items
- Check for key existence with
in - Determine dictionary length with
len()
- Modules 000–022