for x in cars:
print (x)
for y in cars[x]:
print (y,':',cars[x][y])
output:
A
color : 2
speed : 70
B
color : 3
speed : 60
More Related Contents:
- How do I merge two dictionaries in a single expression (take union of dictionaries)?
- Iterating over dictionaries using ‘for’ loops
- How to merge multiple dicts with same key or different key?
- Rename a dictionary key
- What’s a correct and good way to implement __hash__()?
- Safe method to get value of nested dictionary
- How to convert an XML string to a dictionary?
- How to sum dict elements
- How do I format a string using a dictionary in python-3.x?
- How to add multiple values to a dictionary key in python?
- python filter list of dictionaries based on key value
- Extract subset of key-value pairs from dictionary?
- String to Dictionary in Python [duplicate]
- Sorting a dictionary with lists as values, according to an element from the list
- Return first N key:value pairs from dict
- Why do I get an error “‘unicode’ object does not support item deletion” when trying to delete values from a JSON object?
- How to split dictionary into multiple dictionaries fast
- 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 to merge dicts, collecting values from matching keys?
- Merge several Python dictionaries
- Python: Elegantly merge dictionaries with sum() of values [duplicate]
- How can I print multiple things (fixed text and/or variable values) on the same line, all at once?
- Efficient way to remove keys with empty strings from a dict
- How to convert a list to a dictionary with indexes as values?
- Using Python class as a data container [closed]
- How can I convert string values from a dictionary, into int/float datatypes?
- How to type hint a dictionary with values of different types
- sorting list of nested dictionaries in python
- How to convert only numbers in a mixed list into float