Web Analytics

Python collections.Counter() Class

Collectionsโ€ขCounter

The collections.Counter() class is a dict subclass for counting hashable objects.

Syntax

collections.Counter(iterable)

Return Value

A Counter object (dict subclass).

Example

Output
Click Run to execute your code