Deleting and Adding items to a dictionary
mydict = {
"table" : "wood",
"bangle" : "gold",
"window" : "glass",
"body" : "mud",
"shopper" : "plastic",
"protein" : "amino acids"
}
del mydict["protein"]
or
mydict.pop("protein")
mydict["feminine"] = "love"
Comments
Post a Comment
Write something to CodeWithAbdur!