dict.values()
dict.values() is a Python method in the Dictionary Methods category. Returns a view object of all values in the dictionary. The syntax is dict.values(). Returns: Values view. A typical example: d = {"a": 1, "b": 2}
list(d.values()) # [1, 2]. A close sibling is dict.get(), which returns the value for key if it exists, otherwise returns default. A close sibling is dict.keys(), which returns a view object of all keys in the dictionary. A close sibling is dict.items(), which returns a view object of all (key, value) pairs as tuples. A close sibling is dict.update(), which updates the dictionary with key-value pairs from another dict or keyword args. More about this category: Dictionary methods for key-value operations — get, keys, items, update, and more. For a broader walkthrough, read the Dictionary Methods guide. Related Dictionary Methods entries: dict.get(), dict.keys(), dict.items(), dict.update(), dict.pop(), dict.popitem().