Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f27bfd8 commit 87f3d7bCopy full SHA for 87f3d7b
1 file changed
Doc/library/collections.rst
@@ -307,7 +307,7 @@ Common patterns for working with :class:`Counter` objects::
307
dict(c) # convert to a regular dictionary
308
c.items() # convert to a list of (elem, cnt) pairs
309
Counter(dict(list_of_pairs)) # convert from a list of (elem, cnt) pairs
310
- c.most_common()[:-n:-1] # n least common elements
+ c.most_common()[:-n-1:-1] # n least common elements
311
+c # remove zero and negative counts
312
313
Several mathematical operations are provided for combining :class:`Counter`
0 commit comments