mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01:00
SF #990497: Fix a trivial typo in sorted() example.
(Submitted by Daniel Pezely)
This commit is contained in:
parent
872dc5c457
commit
2b05248e8b
@ -540,7 +540,7 @@ expressions. The differences are:
|
||||
>>> L = [9,7,8,3,2,4,1,6,5]
|
||||
>>> [10+i for i in sorted(L)] # usable in a list comprehension
|
||||
[11, 12, 13, 14, 15, 16, 17, 18, 19]
|
||||
>>> L = [9,7,8,3,2,4,1,6,5] # original is left unchanged
|
||||
>>> L # original is left unchanged
|
||||
[9,7,8,3,2,4,1,6,5]
|
||||
|
||||
>>> sorted('Monte Python') # any iterable may be an input
|
||||
|
Loading…
Reference in New Issue
Block a user