Counting With Python's Counter
Christopher Trudeau
36:45
Description
Counting several repeated objects at once is a common problem in programming. Python offers a bunch of tools and techniques you can use to approach this problem. However, Python’s Counter from collections provides a clean, efficient, and Pythonic solution.
This dictionary subclass provides efficient counting capabilities out of the box. Understanding Counter and how to use it efficiently is a convenient skill to have as a Python developer.
In this video course, you’ll learn how to:
What You'll Learn?
- Count several repeated objects at once
- Create counters with Python’s
Counter
- Retrieve the most common objects in a counter
- Update object counts
- Use
Counter
to facilitate further computations - Implement
Counter
instances as multisets
More details
User Reviews
Rating
Christopher Trudeau
Instructor's CoursesChristopher has a passion for the Python language and writes for Real Python. He is a consultant who helps advise organizations on how to improve their technical teams. Christopher is a strong advocate for automation throughout the delivery process and the power of small teams with well defined goals.
You can find Christopher here:

Real Python
View courses Real Python- language english
- Training sessions 7
- duration 36:45
- Release Date 2023/01/05