How to get the least common element in a list?

most_common without any argument returns all the entries, ordered from most common to least.

So to find the least common, just start looking at it from the other end.

Leave a Comment