Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #item #maximum #number #occurrences #list #Python
ADD COMMENT
Topic
Name
5+8 =