It would have the following syntax
dict_names = {'d1' : {'name':'bob', 'place':'lawn', 'animal':'man'}, 'd2' : {'name':'spot', 'place':'bed', 'animal':'dog'}}
You can then look things up like
>>> dict_names['d1']['name'] 'bob'
Related Posts:
- How can I get dictionary key as variable directly in Python (not by searching from value)?
- How to add multiple values per key in python dictionary
- How to add multiple values to a dictionary key in python?
- How to print a dictionary’s key?
- In Python, when to use a Dictionary, List or Set?
- Accessing dict_keys element by index in Python3
- Iterating over dictionaries using ‘for’ loops
- How do I sort a dictionary by value?
- How do I sort a dictionary by value?
- How do I sort a dictionary by value?
- Check if a given key already exists in a dictionary
- How does collections.defaultdict work?
- Is a Python dictionary an example of a hash table?
- Append values to a set in Python
- Converting dictionary to JSON
- How do I merge two dictionaries in a single expression (taking union of dictionaries)?
- Most efficient way to find mode in numpy array
- Python list of dictionaries search
- Updating a dictionary in python
- How to avoid “RuntimeError: dictionary changed size during iteration” error?
- unhashable type: ‘dict’ Type Error [duplicate]
- How to copy a dictionary and only edit the copy
- How to avoid “RuntimeError: dictionary changed size during iteration” error?
- How can I remove a key from a Python dictionary?
- How to solve dictionary changed size during iteration error?
- Does Python have an ordered set?
- DataFrame constructor not properly called
- TypeError: ‘type’ object is not subscriptable when indexing in to a dictionary
- Does Python have an ordered set?
- Python set to list
- TypeError: ‘dict’ object is not callable
- Getting key with maximum value in dictionary?
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- Getting key with maximum value in dictionary?
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- Are dictionaries ordered in Python 3.6+?
- How can I remove a key from a Python dictionary?
- append multiple values for one key in a dictionary [duplicate]
- Convert a python dict to a string and back
- Delete an element from a dictionary
- Get key by value in dictionary
- How to sort a set in python?
- Empty set literal?
- Determine the type of an object?
- Add list to set?
- enumerate() for dictionary in python
- Reverse / invert a dictionary mapping
- Converting Dictionary to List?
- How to pretty print nested dictionaries?
- Python Sets vs Lists
- Convert a Pandas DataFrame to a dictionary
- How to index into a dictionary?
- Add a new item to a dictionary in Python
- How can I add new keys to a dictionary?
- How can I get list of values from dict?
- How to get all subsets of a set? (powerset)
- TypeError: string indices must be integers, not str // working with dict
- How do I format a string using a dictionary in python-3.x?
- Creating a dictionary from a csv file?
- Map to List error: Series object not callable
- How to return dictionary keys as a list in Python?
- How can I create an array/list of dictionaries in python?
- How to save a dictionary to a file?
- Type error Unhashable type:set
- Mapping over values in a python dictionary
- TypeError: ‘dict_keys’ object does not support indexing
- How to convert an XML string to a dictionary?
- How do I print the key-value pairs of a dictionary in python
- How do I print the key-value pairs of a dictionary in python
- How to make a set of lists
- How do I make a dictionary with multiple keys to one value?
- Python: How to check if keys exists and retrieve value from Dictionary in descending priority
- Appending values to dictionary in Python
- Python dictionary from an object’s fields
- Writing a dictionary to a csv file with one line for every ‘key: value’
- How to convert a file into a dictionary?
- Append a dictionary to a dictionary
- Python Add to dictionary loop
- AttributeError: ‘str’ object has no attribute ‘items’
- TypeError: ‘set’ object does not support indexing
- What is key=lambda
- JSON object must be str, bytes or bytearray, not dict
- convert csv file to list of dictionaries
- Declaring a multi dimensional dictionary in python
- how to concatenate two dictionaries to create a new one in Python?
- python-How to solve KeyError: 2?
- Python Set Comprehension
- How to search through dictionaries?
- How do I add two sets?
- Change the name of a key in dictionary
- What is an easy way to implement fprintf in python?
- set object is not JSON serializable
- Get difference between two lists
- Converting a list to a set changes element order
- Create a list with initial capacity in Python
- Iterating over dictionary items(), values(), keys() in Python 3
- Flatten nested dictionaries, compressing keys
- python dictionary error AttributeError: ‘list’ object has no attribute ‘keys’
- Convert list of dictionaries to a pandas DataFrame
- How to print both strings in a dictionary in Python