def _most_common ( iterable ) : data = Counter ( iterable ) return max ( data , key = data . __getitem__ )
least common element in a list python
Returns the most common element in iterable .
def _most_common(iterable):
    """Returns the most common element in `iterable`."""
    data = Counter(iterable)
    return max(data, key=data.__getitem__)