Hi ππ
In this post, I will share with you how to remove values from dictionary
or dict
in Python.
myData = {'a': 1, 'b': 2, 'c': 3} def remove_item(key, data): del myData[key] return myData print(remove_item('a', myData))
Result
{'b': 2, 'c': 3}
Top comments (0)