Contact: aviboots(AT)netvision.net.il
39,939 questions
51,876 answers
573 users
lst = [1, 3, 1, 1, 4, 4, 5, 5, 4, 2, 2, 2, 3, 3, 3] print(max(lst, key = lst.count)) ''' run: 3 '''
from collections import Counter lst = [1, 3, 1, 1, 4, 4, 5, 5, 4, 2, 2, 2, 3, 3, 3] print(Counter(lst).most_common()[0][0]) ''' run: 3 '''