Python Programming - Standard Libraries - Discussion

Discussion Forum : Standard Libraries - General Questions (Q.No. 25)
25.
What does the collections.Counter class do?
Counts the number of elements in a list
Counts the occurrences of elements in an iterable
Creates a counter-clockwise rotation of elements
Sorts the elements of a list
Answer: Option
Explanation:
The collections.Counter class in Python is used to count the occurrences of elements in an iterable, such as a list or a string.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.