mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
Another typo (in the list comprehension example).
This commit is contained in:
parent
4d46d38292
commit
56db095018
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue