Get values from a dictionary in Python

The values() dictionary method returns a view object which contains the values of the dictionary, as a list. The list of the values is a view of the dictionary, meaning that any changes done to the dictionary will be reflected in the values list.

Example:

my_dictionary = {'name': 'Dmitri', 'topic': 'Python', 'fav_food': 'ice cream'}

dict_values = my_dictionary.values()
# add a new value
my_dictionary['course'] = 'Python'
# and print the values after that - they are updated
print(dict_values)
Output:
dict_values(['Dmitri', 'Python', 'ice cream', 'Python'])