From: Georg Brandl Date: Sat, 6 Dec 2008 14:28:56 +0000 (+0000) Subject: #4562: fix zip() examples. X-Git-Tag: v3.1a1~742 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17fe364b44c31c88a49f7d1d24efa7cdce8b6ccd;p=thirdparty%2FPython%2Fcpython.git #4562: fix zip() examples. --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 916db6da6014..364d9de76bdc 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