diff --git a/book/ch04.rst b/book/ch04.rst index 764becda..3854e135 100644 --- a/book/ch04.rst +++ b/book/ch04.rst @@ -1518,7 +1518,7 @@ progress if a ``verbose`` flag is set: ... freqdist[word] += 1 ... if verbose and freqdist.N() % 100 == 0: print(".") ... if verbose: print - ... return freqdist.keys()[:num] + ... return freqdist.most_common(num) .. caution:: Take care not to use a mutable object as the default value of