diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-05-13 04:55:24 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-05-13 04:55:24 (GMT) |
commit | 752abd0d3cc66f84f551650b8424248b202a16a4 (patch) | |
tree | f5302f8a246115f3f61a1414a94c8d2ce12a3a01 /Doc/tutorial/datastructures.rst | |
parent | 8321f978918e3ae4de18672770c6504dcae82343 (diff) | |
download | cpython-752abd0d3cc66f84f551650b8424248b202a16a4.zip cpython-752abd0d3cc66f84f551650b8424248b202a16a4.tar.gz cpython-752abd0d3cc66f84f551650b8424248b202a16a4.tar.bz2 |
Convert a lot of print statements to print functions in docstrings,
documentation, and unused/rarely used functions.
Diffstat (limited to 'Doc/tutorial/datastructures.rst')
-rw-r--r-- | Doc/tutorial/datastructures.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 7999e0d..8e4f053 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -239,7 +239,7 @@ lists, one list per row:: Now, if you wanted to swap rows and columns, you could use a list comprehension:: - >>> print [[row[i] for row in mat] for i in [0, 1, 2]] + >>> print([[row[i] for row in mat] for i in [0, 1, 2]]) [[1, 4, 7], [2, 5, 8], [3, 6, 9]] Special care has to be taken for the *nested* list comprehension: @@ -251,7 +251,7 @@ A more verbose version of this snippet shows the flow explicitly:: for i in [0, 1, 2]: for row in mat: - print row[i], + print(row[i], end="") print In real world, you should prefer builtin functions to complex flow statements. |