Open chengchengxu15 opened 3 years ago
https://docs.python.org/zh-cn/3/library/collections.html?highlight=deque
python 里面一个特别实用的模块:
主要: collections.deque() 类似列表(list)的容器,实现了在两端快速添加(append)和弹出(pop) collections.Counter() 字典的子类,提供了可哈希对象的计数功能 collections.OrderedDict() 字典的子类,保存了他们被添加的顺序 collections.defaultdict() 字典的子类,提供了一个工厂函数,为字典查询提供一个默认值
https://docs.python.org/zh-cn/3/library/collections.html?highlight=deque
python 里面一个特别实用的模块:
主要: collections.deque() 类似列表(list)的容器,实现了在两端快速添加(append)和弹出(pop) collections.Counter() 字典的子类,提供了可哈希对象的计数功能 collections.OrderedDict() 字典的子类,保存了他们被添加的顺序 collections.defaultdict() 字典的子类,提供了一个工厂函数,为字典查询提供一个默认值