Answers for "max occurrences in list 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
7

find max value in list python

mylist = [1, 7, 3, 12, 5]

min_value = min(mylist)
max_value = max(mylist)
Posted by: Guest on April-22-2021

Code answers related to "max occurrences in list python"

Python Answers by Framework

Browse Popular Code Answers by Language