I've just uploaded the collections module materials to my standardlib-datastruct repository. This one's a bit different from my previous workbooks.
What's Inside
The collections materials include 24 exercises covering high-performance container datatypes from Python's collections module:
Collections Covered
-
Counter- Count hashable objects and perform arithmetic operations -
defaultdict- Dictionary with default values for missing keys -
deque- Double-ended queue with fast appends/pops from both ends -
namedtupleandtyping.NamedTuple- Tuple subclasses with named fields -
ChainMap- Group multiple dictionaries into a single view -
OrderedDict- Dictionary that preserves insertion order
My Learning Approach for This Module
I didn't do the exercises for this module. Instead, I learned from learning.txt which contains concise definitions and key functionalities for each collection type.
Why? Because libraries are different from pure Python programming. With libraries, you can look them up later when you need them or if you forget. The important thing is knowing what exists and what it does, not memorizing every detail.
If you want to practice, the exercises are there for you to work through. For me, understanding the core concepts from the learning notes was enough.
About This Learning Path
This workbook follows the same principle: Order doesn't matter—coverage does.
The prerequisites are minimal since collections is fairly straightforward:
- Understanding of Python's basic data structures (dict, list, tuple)
- Knowing when you need specialized containers
My Approach
I'm learning the standard library by:
- Selecting the most useful modules and functions
- Creating hands-on exercises that demonstrate real use cases
- Building a personal reference that I can return to
- Sharing it for others who want to follow a similar path
This repository (standardlib-datastruct) focuses on standard library tools that are useful when handling data structures. This may not include everything—I only add what I find necessary and want to learn. It's my curated selection based on practical needs.
Some standard library modules may be skipped because 3rd party or external libraries handle those use cases better. I focus on what's worth learning from the standard library itself.
This is my way of learning—practical, focused, and exercise-driven. If you're past the beginner stage and want to level up your Python skills, this might resonate with you.
Get the Materials
The collections materials are available now in the repository as collections.7z. It includes:
-
advanced_python_collections_workbook.md- Markdown format with exercises (generated by ChatGPT) -
Advanced Python Collections Workbook.pdf- PDF format (generated by ChatGPT) -
learning.txt- My concise learning notes (what I actually used)
Feel free to download and use whichever format works for you—exercises for practice or learning notes for quick reference.
Repository: github.com/hejhdiss/standardlib-datastruct
Previous additions: functools workbook, itertools workbook, types workbook
Note: This is a living project. I'll continue adding more standard library modules as I complete them. Follow along if this learning approach works for you!
Top comments (0)