![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=1739339720-h9TYlhUKE9xDYRvhFgXtzmn8Z1o5XqPB-0-d650c4adcc61f0dabd23d4e603aee4d1)
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.