Write a python function thats accepts a list and returns most frequent element that appears in a list


Topic: Write a python function thats accepts a list and returns most frequent element that appears in a list

Solution

def most_frequent(list):
    return max(set(list), key = list.count)



List all Python Programs