To add a new Value to a Dictionary in Python you can use one of the following ways.

Sample Python

myDict['key'] = 'value'

or

Sample Python

myDict = {'key':'value'}

4 thought on “How to add a new Value to a Dictionary in Python”

Leave a Reply