Mojo module
counter
Defines the Counter type.
Import these APIs from the collections package:
from collections import CounterCounters provide convenient tallying objects that use a dictionary to store keys and their counts. They offer the full functionality of counted sets, also called bags or multisets, and extend that model by supporting negative counts.
Structsโ
- โ
Counter: A container for counting hashable items. - โ
CountTuple: A tuple representing a value and its count in aCounter.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!