Consider a list with 100 elements. I want to write a code to print 10 most occuring element.
import itertools
import operator
def most_common(lst):
return max(set(lst), key=lst.count)
THis is giving me the 1st most occuring element. I want 10 most occuring.