from collections import Counter my_list = [1, 2, 3, 4, 2, 3, 2, 4, 1, 2, 2] most_common_element = Counter(my_list).most_common(1)[0][0] print(most_common_element)
from collections import Counter my_list = [1, 2, 3, 4, 2, 3, 2, 4, 1, 2, 2] most_common_element = Counter(my_list).most_common(1)[0][0] print(most_common_element)