How to Remove Dictionary Elements and Dictionaries : Pop : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Pop »

 

How to Remove Dictionary Elements and Dictionaries


dict2 = {'name': 'earth', 'port': 80}
del dict2['name']       # remove entry with key 'name'
dict2.clear()           # remove all entries in dict1
del dict2               # delete entire dictionary



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Dictionary
» Pop