From: Georg Brandl Date: Fri, 8 Aug 2008 06:44:14 +0000 (+0000) Subject: #3522: zip() returns an iterator. X-Git-Tag: v3.0b3~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=409c9d7184276df875c884c9220a2e6d0efd997c;p=python #3522: zip() returns an iterator. --- diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 623986ecd6..a068efd0c7 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.