Open this example in the interactive library
Source code
from collections import Counter
print(Counter([3, 1, 3, 2, 3]).most_common(1))Sample output
[(3, 3)]

Read the most common element. A self-contained example using the Python standard library.
Open this example in the interactive library
from collections import Counter
print(Counter([3, 1, 3, 2, 3]).most_common(1))[(3, 3)]