Skip to main content

One doc tagged with "namedtuple"

View all tags

Introduction to Python Collections Module: namedtuple, deque, Counter

We've now mastered Python's four core collection types. But what happens when you need a more specialized tool? The collections module in Python's standard library provides high-performance, specialized container datatypes. In this article, we'll introduce three of the most useful: namedtuple, deque, and Counter.