Answers for "appending to new dictionary"

5

python append to dictionary

dict = {1 : 'one', 2 : 'two'}
# Print out the dict
print(dict)
# Add something to it
dict[3] = 'three'
# Print it out to see it has changed
print(dict)
Posted by: Guest on July-30-2020

Code answers related to "appending to new dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language