Answers for "find the item with the maximum number of occurrences in a list in Python"

0

find the item with the maximum number of occurrences in a list in Python

l=[1,2,3,4,2,1,3,4,2,1,3,4,2]
l1 = max(l,key=l.count)
print(l1)
Posted by: Guest on September-21-2021

Code answers related to "find the item with the maximum number of occurrences in a list in Python"

Python Answers by Framework

Browse Popular Code Answers by Language