A developer is processing a large log file where each line contains a user's action. They need to count the occurrences of each unique action to identify the most common ones. Which Python collection is the most efficient and idiomatic for this task?
-
A
A dictionary, manually incrementing counts for each action.
-
B
A list of tuples, where each tuple stores an action and its count.
-
C
A `collections.Counter` object.
-
D
A set to store the unique actions, then iterating through it to count them in the original file.