Function Details: values

Description


Returns a new view of the dictionary's values.


Extended Description


The values() method returns a view object containing all values in the dictionary. This view object is dynamic, meaning it reflects any changes made to the dictionary. The values view does not support indexing, but can be converted to a list if needed. Unlike keys(), the values() view does not support set operations as values are not guaranteed to be unique or hashable.


Function Signature


dict.values() -> dict_values

Module: dict

Class: dictionary

Parameters



Return


Returns a dict_values object, which is a view of the dictionary's values.


Return Type


dict_values

Output

Explanation

This example shows how to use values() and convert the result to a list.