Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #append #dictionary
ADD COMMENT
Topic
Name
1+7 =