diff Doc/tutorial/datastructures.rst @ 50563:93cf3a6ead63 3.0

Merged revisions 68226 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r68226 | georg.brandl | 2009-01-03 22:18:54 +0100 (Sat, 03 Jan 2009) | 2 lines Remove trailing whitespace. ........
author Georg Brandl <georg@python.org>
date Sun, 04 Jan 2009 00:04:26 +0000
parents 4229a4b14f1d
children ea7e307ddd51
line wrap: on
line diff
--- a/Doc/tutorial/datastructures.rst	Sun Jan 04 00:02:52 2009 +0000
+++ b/Doc/tutorial/datastructures.rst	Sun Jan 04 00:04:26 2009 +0000
@@ -159,7 +159,7 @@
 
 List comprehensions provide a concise way to create lists from sequences.
 Common applications are to make lists where each element is the result of
-some operations applied to each member of the sequence, or to create a 
+some operations applied to each member of the sequence, or to create a
 subsequence of those elements that satisfy a certain condition.
 
 
@@ -167,7 +167,7 @@
 clause, then zero or more :keyword:`for` or :keyword:`if` clauses.  The result
 will be a list resulting from evaluating the expression in the context of the
 :keyword:`for` and :keyword:`if` clauses which follow it.  If the expression
-would evaluate to a tuple, it must be parenthesized. 
+would evaluate to a tuple, it must be parenthesized.
 
 Here we take a list of numbers and return a list of three times each number::
 
@@ -227,7 +227,7 @@
 powerful tool but -- like all powerful tools -- they need to be used carefully,
 if at all.
 
-Consider the following example of a 3x3 matrix held as a list containing three 
+Consider the following example of a 3x3 matrix held as a list containing three
 lists, one list per row::
 
     >>> mat = [
@@ -236,7 +236,7 @@
     ...        [7, 8, 9],
     ...       ]
 
-Now, if you wanted to swap rows and columns, you could use a list 
+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]])
@@ -254,7 +254,7 @@
             print(row[i], end="")
         print()
 
-In real world, you should prefer builtin functions to complex flow statements. 
+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::
 
     >>> list(zip(*mat))