Reference group
>Dictionary Methods
Useful ways to look up, add, remove, and inspect dictionary data. 11 entries.
clear()dict.clear()Remove all items from the dictionary.copy()dict.copy()Return a shallow copy of the dictionary.fromkeys()dict.fromkeys(iterable, value=None)Create a new dictionary with keys from an iterable and a shared default value.get()dict.get(key, default=None)Look up a value safely without raising a KeyError if missing.items()dict.items()Return a dynamic view of all (key, value) pairs in the dictionary.keys()dict.keys()Return a dynamic view of all keys in the dictionary.pop()dict.pop(key, default=None)Remove and return the value for a specified key.popitem()dict.popitem()Remove and return the last inserted (key, value) pair.setdefault()dict.setdefault(key, default=None)Return the value of a key; if absent, insert the key with the default value.update()dict.update([other], **kwargs)Update the dictionary with key-value pairs from another dict or iterable.values()dict.values()Return a dynamic view of all values in the dictionary.
Looking for something else?
All reference groups