Another typo (in the list comprehension example).

This commit is contained in:
Guido van Rossum 2000-09-06 23:34:25 +00:00
parent 4d46d38292
commit 56db095018

View File

@ -122,7 +122,7 @@ from another list (or lists). The simplest form is:
[<expression> for <variable> in <sequence>]
For example, [x**2 for i in range(4)] yields the list [0, 1, 4, 9].
For example, [i**2 for i in range(4)] yields the list [0, 1, 4, 9].
This is more efficient than map() with a lambda.
You can also add a condition: