Finding the mode of a list

You can use the max function and a key. Have a look at python max function using ‘key’ and lambda expression.

max(set(lst), key=lst.count)

Leave a Comment