Closed
Description
Documentation
A example of lambda expressions introduces list.sort()
, but there aren't details of list.sort()
before.
>>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]
>>> pairs.sort(key=lambda pair: pair[1])
>>> pairs
[(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')]
We shoud link more on lists after this example or in tutorial 3.1.3 lists.
Linked PRs
- gh-133881: detailed the docs for an example with a lambda expression using list.sort() #133910
- [3.14] gh-133881: add forward reference to
list.sort()
in lambda expression tutorial (GH-133910) #134126 - [3.13] gh-133881: add forward reference to
list.sort()
in lambda expression tutorial (GH-133910) #134127
Metadata
Metadata
Assignees
Projects
Status
Todo