To convert a dictionary to a list in Python, call list() on the part you want: list(d) gives the keys, list(d.values()) the values, and list(d.items()) a list of (key, value) tuples. All three keep the dictionary’s insertion order:
list(prices.values()) # [14.99, 9.5, 4.25]
list(prices.items()) # [('Coffee beans', 14.99), ...]
A small store price list runs through every example; I ran them on Python 3.12.5, where dicts always keep insertion order.
You’ll see keys, values and items as lists, the ‘dict_values’ subscript error, filtering and sorting while converting, flattening a dict of lists, and turning nested dicts into rows.
Convert a dictionary to a list of keys, values or items
Pick the view you need and wrap it in list(). For pairs that must be lists rather than tuples, say for JSON, use a comprehension:
prices = {"Coffee beans": 14.99, "Mug": 9.50, "Filters": 4.25}
print(list(prices)) # keys
print(list(prices.values())) # values
print(list(prices.items())) # (key, value) tuples
print([[k, v] for k, v in prices.items()]) # pairs as lists, e.g. for JSON
Output:
['Coffee beans', 'Mug', 'Filters']
[14.99, 9.5, 4.25]
[('Coffee beans', 14.99), ('Mug', 9.5), ('Filters', 4.25)]
[['Coffee beans', 14.99], ['Mug', 9.5], ['Filters', 4.25]]

list(d) and list(d.keys()) are the same. For more on the values case, see converting dictionary values to a list.
Why do I get ‘dict_values’ object is not subscriptable?
d.values() returns a view, not a list, so you can’t index it. Convert it first, or use next(iter(...)) for just the first value:
prices = {"Coffee beans": 14.99, "Mug": 9.50, "Filters": 4.25}
values = prices.values()
try:
print(values[0])
except TypeError as err:
print("TypeError:", err)
print(list(values)[0])
print(next(iter(values))) # first value without building a list
prices["Kettle"] = 39.00
print(values) # a view: it sees the new item
Output:
TypeError: 'dict_values' object is not subscriptable
14.99
14.99
dict_values([14.99, 9.5, 4.25, 39.0])

Views stay live: add a key and the view shows it. Keys work the same way, as in getting the keys of a dictionary.
Filter and sort while converting a dictionary to a list
A comprehension can pick and reshape items in the same step. sorted() on items() sorts by key, or by value with a key function:
prices = {"Coffee beans": 14.99, "Mug": 9.50, "Filters": 4.25, "Kettle": 39.00, "Grinder": 89.99}
over_10 = [item for item, price in prices.items() if price > 10]
print("over $10:", over_10)
by_price = sorted(prices.items(), key=lambda kv: kv[1], reverse=True)
print("most expensive first:", by_price[:3])
labels = [f"{item}: ${price:.2f}" for item, price in prices.items()]
print(labels)
Output:
over $10: ['Coffee beans', 'Kettle', 'Grinder']
most expensive first: [('Grinder', 89.99), ('Kettle', 39.0), ('Coffee beans', 14.99)]
['Coffee beans: $14.99', 'Mug: $9.50', 'Filters: $4.25', 'Kettle: $39.00', 'Grinder: $89.99']

For the pairs as tuples in more depth, see converting a dictionary to a list of tuples.
Flatten a dictionary of lists into one list
When each value is itself a list, a nested comprehension or itertools.chain joins them into one list:
from itertools import chain
stock = {"Austin": ["Mug", "Kettle"], "Denver": ["Beans"], "Tampa": ["Mug", "Filters"]}
flat = [item for items in stock.values() for item in items]
print(flat)
print(list(chain.from_iterable(stock.values())))
print(sorted(set(flat)))
pairs = [x for kv in {"TX": 3, "CO": 1}.items() for x in kv] # keys and values interleaved
print(pairs)
Output:
['Mug', 'Kettle', 'Beans', 'Mug', 'Filters']
['Mug', 'Kettle', 'Beans', 'Mug', 'Filters']
['Beans', 'Filters', 'Kettle', 'Mug']
['TX', 3, 'CO', 1]

Wrap the result in set() when repeats don’t matter. Building this kind of dict in the first place is covered in a Python dictionary of lists.
Convert a dictionary of dictionaries to a list of records
APIs often return records keyed by ID. Merge the key into each record to get a list you can sort, filter or write to CSV:
orders = {
1001: {"customer": "Emily Carter", "state": "TX", "total": 129.99},
1002: {"customer": "James Wilson", "state": "CO", "total": 54.50},
}
rows = [{"id": oid, **data} for oid, data in orders.items()]
print(rows)
totals = [o["total"] for o in orders.values()]
print(totals, f"sum ${sum(totals):.2f}")
Output:
[{'id': 1001, 'customer': 'Emily Carter', 'state': 'TX', 'total': 129.99}, {'id': 1002, 'customer': 'James Wilson', 'state': 'CO', 'total': 54.5}]
[129.99, 54.5] sum $184.49
{"id": oid, **data} builds a new dict without changing the original. The reverse direction is covered in creating a dictionary from two lists.
Dictionary to list methods compared
| You want | Code |
|---|---|
| Keys | list(d) |
| Values | list(d.values()) |
| (key, value) tuples | list(d.items()) |
| [key, value] lists | [[k, v] for k, v in d.items()] |
| Sorted by value | sorted(d.items(), key=lambda kv: kv[1]) |
| Flattened values | [x for v in d.values() for x in v] |
More conversions between Python’s built-in types:
- Create a dictionary from a list in Python
- Compare lists, tuples, sets and dictionaries
- Convert a set to a list in Python
- Count the keys in a Python dictionary
Frequently asked questions
How do I convert a dictionary to a list in Python?
Use list(d) for keys, list(d.values()) for values or list(d.items()) for key-value pairs.
Does converting a dict to a list keep the order?
Yes. Since Python 3.7, dictionaries keep insertion order, and list() follows it.
Why can’t I index d.values()?
It’s a view object, not a list. Use list(d.values())[0] or next(iter(d.values())).
How do I get a list of key-value lists instead of tuples?
Use [[k, v] for k, v in d.items()].
How do I convert a dict to a list sorted by value?
Use sorted(d.items(), key=lambda kv: kv[1]); add reverse=True for largest first.
Where are dictionary views documented?
See dictionary view objects in the Python docs.

Bijay Kumar is a 13-time Microsoft MVP with more than 18 years in software development, and the founder of Python Guides and TSinfo Technologies. He started out building .NET and SharePoint solutions at HP, TCS and KPIT before moving into Python, machine learning and AI, and he also builds web apps with TypeScript and React. He writes the tutorials here himself, and every example is run before publishing so you see the real output. More about Bijay · Microsoft MVP profile · LinkedIn