mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
tip-toe around dictionary keys view in the tutorial
This commit is contained in:
parent
f088e5e6cc
commit
ff94552763
1 changed files with 1 additions and 1 deletions
|
@ -440,7 +440,7 @@ pair with ``del``. If you store using a key that is already in use, the old
|
|||
value associated with that key is forgotten. It is an error to extract a value
|
||||
using a non-existent key.
|
||||
|
||||
The :meth:`keys` method of a dictionary object returns a list of all the keys
|
||||
Preforming ``list(d.keys())`` on a dictionary returns a list of all the keys
|
||||
used in the dictionary, in arbitrary order (if you want it sorted, just apply
|
||||
the :meth:`sort` method to the list of keys). To check whether a single key is
|
||||
in the dictionary, use the :keyword:`in` keyword.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue