How can I get list of values from dict?

dict.values returns a view of the dictionary’s values, so you have to wrap it in list:

list(d.values())

Leave a Comment