Answers for "python remove sub item from dictionary"

8

python delete value from dictionary

dict.pop('key')

#optionally you can give value to return if key doesn't exist (default is None)
dict.pop('key', 'key not found')
Posted by: Guest on May-25-2020

Code answers related to "python remove sub item from dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language