Find the Most Frequent Element in a List

Published by Matt in

Create a function that takes a list and returns the most frequently occurring element contained within it.

Examples

find_frequent([3, 7, 3]) ➞ 3

find_frequent([None, "hello", True, None]) ➞ None

find_frequent([False, "up", "down", "left", "right", True, False]) ➞ False

Notes

N/A

Watch a quick demo on how Edabit works.