summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-08-08 06:44:14 (GMT)
committerGeorg Brandl <georg@python.org>2008-08-08 06:44:14 (GMT)
commit409c9d7184276df875c884c9220a2e6d0efd997c (patch)
tree7ff16e6cc075717620098cd021776ea69ca17c03 /Doc/tutorial
parent676cce3b4bb08c724723600952c33e2359230ed1 (diff)
downloadcpython-409c9d7184276df875c884c9220a2e6d0efd997c.zip
cpython-409c9d7184276df875c884c9220a2e6d0efd997c.tar.gz
cpython-409c9d7184276df875c884c9220a2e6d0efd997c.tar.bz2
#3522: zip() returns an iterator.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/datastructures.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index 623986e..a068efd 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -257,7 +257,7 @@ A more verbose version of this snippet shows the flow explicitly::
In real world, you should prefer builtin functions to complex flow statements.
The :func:`zip` function would do a great job for this use case::
- >>> zip(*mat)
+ >>> list(zip(*mat))
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
See :ref:`tut-unpacking-arguments` for details on the asterisk in this line.