Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e0ad46 commit 70c2dd3Copy full SHA for 70c2dd3
1 file changed
Doc/library/operator.rst
@@ -321,6 +321,9 @@ expect a function argument.
321
>>> itemgetter(slice(2,None))('ABCDEFG')
322
'CDEFG'
323
324
+ >>> soldier = dict(rank='captain', name='dotterbart')
325
+ >>> itemgetter('rank')(soldier)
326
+ 'captain'
327
328
Example of using :func:`itemgetter` to retrieve specific fields from a
329
tuple record:
0 commit comments