values()
` function to return values of a dictionary :# create a dictionary
my_dict = {"apple": 2, "banana": 3, "orange": 4}
# print the values of the dictionary using values() function
for value in my_dict.values():
print(value)
2
3
4
my_dict
`. Then, we have printed all the values of the dictionary using a `for
` loop and the `values()
` function of the dictionary object.