This method returns a list, the example from The Fine Docs being:-

>>> Counter('abracadabra').most_common(3)
[('a', 5), ('r', 2), ('b', 2)]

With the trend in Python being more and more towards methods returning iterators, is there ever likely to be an imost_common method, or has this been suggested and rejected, or what? I'm really just curious, but if enough people were to express an interest and it hasn't already been done, I'd happily raise an enhancement request on the bug tracker.

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to