dict.values
returns a view of the dictionary’s values, so you have to wrap it in list
:
list(d.values())
More Related Contents:
- how do I make two dictionary keys with value as list [closed]
- How to name a file using a value in a list in a dictionary?
- How to make a dict from n’th indices of tuples in list
- How do I initialize a dictionary of empty lists in Python?
- How to return dictionary keys as a list in Python?
- Dictionary: Get list of values for list of keys
- In Python, when to use a Dictionary, List or Set?
- Create a list with initial capacity in Python
- merging Python dictionaries
- How can I access the nested data in this complex JSON, which includes another JSON document as one of the strings?
- How can I initialize a dictionary of distinct empty lists in Python?
- List of tuples to dictionary [duplicate]
- How do I combine two lists into a dictionary in Python? [duplicate]
- Converting list of tuples into a dictionary
- [] and {} vs list() and dict(), which is better?
- Converting Dictionary to List? [duplicate]
- Appending a dictionary to a list in a loop
- Sorting a dictionary with lists as values, according to an element from the list
- How do I serialize a Python dictionary into a string, and then back to a dictionary?
- One liner: creating a dictionary from list with indices as keys
- Group by multiple keys and summarize/average values of a list of dictionaries
- Convert list of strings to dictionary
- Using a dict to translate numbers to letters in python
- How can I make a dictionary (dict) from separate lists of keys and values?
- How do I sort this list in Python, if my date is in a String?
- How can I avoid “RuntimeError: dictionary changed size during iteration” error?
- Creating a dictionary with list of lists in Python
- Mapping dictionary value to list
- How to sort a list of dictionaries by a value of the dictionary in Python?
- How to create a nested dictionary from a list in Python?