Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add new keys to a dictionary python

d = {'key':'value'}
print(d)
# {'key': 'value'}
d['mynewkey'] = 'mynewvalue'
print(d)
# {'mynewkey': 'mynewvalue', 'key': 'value'}
 
PREVIOUS NEXT
Tagged: #add #keys #dictionary #python
ADD COMMENT
Topic
Name
3+6 =