thisdict = { "brand": "Ford", "model": "Mustang", "year": 1964 } thisdict.pop("model")
del d[key]
dict.pop("key")
''' Deleting an entry from dictionary using del ''' # If key exist in dictionary then delete it using del. if "at" in wordFreqDic: del wordFreqDic["at"] print("Updated Dictionary :" , wordFreqDic)
squares = {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} # remove a particular item, returns its value # Output: 16 print(squares.pop(4))