Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to Add Elements to a dictionary

myDictionary = {
    "first": "A",
    "second": "B",
    "third": "C",
}
myDictionary["fourth"] = "D"
print(myDictionary)
# Output:
# {'first': 'A', 'second': 'B', 'third': 'C', 'fourth': 'D'}
Source by liu-111.medium.com #
 
PREVIOUS NEXT
Tagged: #How #Add #Elements #dictionary
ADD COMMENT
Topic
Name
5+8 =