summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-06 14:28:56 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-06 14:28:56 (GMT)
commit17fe364b44c31c88a49f7d1d24efa7cdce8b6ccd (patch)
treee200ea378e515b1f3c12a4e68705472ce03f1da9 /Doc
parent518d8da05c6cbf04b285d74efeb8ccf635e23486 (diff)
downloadcpython-17fe364b44c31c88a49f7d1d24efa7cdce8b6ccd.zip
cpython-17fe364b44c31c88a49f7d1d24efa7cdce8b6ccd.tar.gz
cpython-17fe364b44c31c88a49f7d1d24efa7cdce8b6ccd.tar.bz2
#4562: fix zip() examples.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 916db6d..364d9de 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1161,9 +1161,9 @@ are always available. They are listed here in alphabetical order.
>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)
- >>> zipped
+ >>> list(zipped)
[(1, 4), (2, 5), (3, 6)]
- >>> x2, y2 = zip(*zipped)
+ >>> x2, y2 = zip(*zip(x, y))
>>> x == x2, y == y2
True