![Learn Web Development with Python](https://wfqqreader-1252317822.image.myqcloud.com/cover/94/36699094/b_36699094.jpg)
上QQ阅读APP看书,第一时间看更新
The collections module
When Python general purpose built-in containers (tuple, list, set, and dict) aren't enough, we can find specialized container datatypes in the collections module. They are:
![](https://epubservercos.yuewen.com/94EE45/19470384108837106/epubprivate/OEBPS/Images/001.jpg?sign=1739241101-P3XnioA3PnwaEoai1UTqFYZIHk9RCUNd-0-974a2caed3223105bf9ac1983814d0e7)
We don't have the room to cover all of them, but you can find plenty of examples in the official documentation, so here I'll just give a small example to show you namedtuple, defaultdict, and ChainMap.