From 409c9d7184276df875c884c9220a2e6d0efd997c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 8 Aug 2008 06:44:14 +0000 Subject: #3522: zip() returns an iterator. --- Doc/tutorial/datastructures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v0.12