Courses/Collections & Stdlib Toolbox

๐Ÿงฐ Collections & Stdlib Toolbox

Counter

Count anything with one line.

Counter is a dict subclass for counting hashable items. most_common(n) returns the top n.

main.py
Output
Press Run to execute.
Expected output
[('i', 4), ('s', 4)]

Sign in to track your progress across lessons.