Answers for "python add field to dictionary"

0

python add field to dictionary

d = {'key': 'value'}
print(d)  # {'key': 'value'}

d['mynewkey'] = 'mynewvalue'

print(d)  # {'key': 'value', 'mynewkey': 'mynewvalue'}
Posted by: Guest on July-23-2021

Code answers related to "python add field to dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language