summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Werner <1benediktwerner@gmail.com>2019-03-21 15:28:49 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-03-21 15:28:49 (GMT)
commit14e3c447c1cdd386bc93ac884e8c8b7f297817df (patch)
treed303b1b6dbfc09b76c3ececc2510d62b679d23b7
parente680c3db80efc4a1d637dd871af21276db45ae03 (diff)
downloadcpython-14e3c447c1cdd386bc93ac884e8c8b7f297817df.zip
cpython-14e3c447c1cdd386bc93ac884e8c8b7f297817df.tar.gz
cpython-14e3c447c1cdd386bc93ac884e8c8b7f297817df.tar.bz2
Fix table formatting in itertools doc (GH-12228)
-rw-r--r--Doc/library/itertools.rst13
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index b1513cd..3d4e583 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -70,12 +70,17 @@ Iterator Arguments Resu
:func:`permutations` p[, r] r-length tuples, all possible orderings, no repeated elements
:func:`combinations` p, r r-length tuples, in sorted order, no repeated elements
:func:`combinations_with_replacement` p, r r-length tuples, in sorted order, with repeated elements
-``product('ABCD', repeat=2)`` ``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``
-``permutations('ABCD', 2)`` ``AB AC AD BA BC BD CA CB CD DA DB DC``
-``combinations('ABCD', 2)`` ``AB AC AD BC BD CD``
-``combinations_with_replacement('ABCD', 2)`` ``AA AB AC AD BB BC BD CC CD DD``
============================================== ==================== =============================================================
+============================================== =============================================================
+Examples Results
+============================================== =============================================================
+``product('ABCD', repeat=2)`` ``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``
+``permutations('ABCD', 2)`` ``AB AC AD BA BC BD CA CB CD DA DB DC``
+``combinations('ABCD', 2)`` ``AB AC AD BC BD CD``
+``combinations_with_replacement('ABCD', 2)`` ``AA AB AC AD BB BC BD CC CD DD``
+============================================== =============================================================
+
.. _itertools-functions: