default_data['item3'] = 3
Easy as py.
Another possible solution:
default_data.update({'item3': 3})
which is nice if you want to insert multiple items at once.
More Related Contents:
- Convert array dictionary to a dictionary python
- Function to return results in a dictionary in Python
- How to select random key with common values?
- Convert a String representation of a Dictionary to a dictionary?
- How to “perfectly” override a dict?
- List of unique dictionaries
- How to properly subclass dict and override __getitem__ & __setitem__
- How to overcome TypeError: unhashable type: ‘list’
- Inverse dictionary lookup in Python
- How to sort objects by multiple keys?
- What do I do when I need a self referential dictionary?
- Appending a dictionary to a list – I see a pointer like behavior
- Converting Python dict to kwargs?
- count the number of occurrences of a certain value in a dictionary in python?
- Pandas groupby.size vs series.value_counts vs collections.Counter with multiple series
- Search for a key in a nested Python dictionary
- Accessing items in an collections.OrderedDict by index
- How do I make a dictionary with multiple keys to one value?
- Is there a ‘multimap’ implementation in Python?
- Append a dictionary to a dictionary [duplicate]
- Why is a class __dict__ a mappingproxy?
- How do you find the first key in a dictionary?
- Is there a recursive version of the dict.get() built-in?
- Global dictionaries don’t need keyword global to modify them? [duplicate]
- How can one make a dictionary with duplicate keys in Python?
- how to convert list of dict to dict
- Is the order of a Python dictionary guaranteed over iterations?
- Know the depth of a dictionary
- How can I make a list of dictionaries according to the Cartesian product of values in a source dictionary (“explode” the dictionary)?
- Determine whether a key is present in a dictionary [duplicate]