Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dictionary python

# dictionary refresh


new_dict = {
    "first":"1,2,3",
    "second":"321",
    "third":"000",
}


# adding to dictionary
new_dict.update({"fourth":"D"})
print(new_dict)

#removing from dictionary
new_dict.pop("first")
print(new_dict)


new = {"five":"888"}
#updating a dictionary
new_dict.update(new)
print(new_dict)
 
PREVIOUS NEXT
Tagged: #dictionary #python
ADD COMMENT
Topic
Name
9+8 =