Sign up
Sign in
nums = [3, 4, 6, 10, 10, 3, 3, 3]mode = max(set(nums), key=nums.count) # mode = most frequent element
Artturi Jalli
--
Share
when i have 2 values with same frequency, it output only one value
Full Stack Developer
Help
Status
About
Careers
Press
Blog
Privacy
Rules
Terms
Text to speech