summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-03-01 11:31:05 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-03-01 11:31:05 (GMT)
commit0580cbb1640d38a98677e36bc0947b0ec1064c26 (patch)
tree7c7dec46166618d60b0925f5a603795a1caf0384 /Doc/library/collections.rst
parentc0b64663d940d717c2b75f94c398956ffea3e6f4 (diff)
parentfaaba59977036da9f4179ef426e0862251110ba0 (diff)
downloadcpython-0580cbb1640d38a98677e36bc0947b0ec1064c26.zip
cpython-0580cbb1640d38a98677e36bc0947b0ec1064c26.tar.gz
cpython-0580cbb1640d38a98677e36bc0947b0ec1064c26.tar.bz2
Merge
Diffstat (limited to 'Doc/library/collections.rst')
-rw-r--r--Doc/library/collections.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index ea4a311..96c5aef 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -215,7 +215,7 @@ For example::
>>> # Find the ten most common words in Hamlet
>>> import re
- >>> words = re.findall('\w+', open('hamlet.txt').read().lower())
+ >>> words = re.findall(r'\w+', open('hamlet.txt').read().lower())
>>> Counter(words).most_common(10)
[('the', 1143), ('and', 966), ('to', 762), ('of', 669), ('i', 631),
('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)]