]> granicus.if.org Git - python/commitdiff
#3522: zip() returns an iterator.
authorGeorg Brandl <georg@python.org>
Fri, 8 Aug 2008 06:44:14 +0000 (06:44 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 8 Aug 2008 06:44:14 +0000 (06:44 +0000)
Doc/tutorial/datastructures.rst

index 623986ecd67a35610d9563f6fca3472776e4df96..a068efd0c77354f8626914f67a0ce705eb5ab018 100644 (file)
@@ -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.