You can use the following syntax to delete the element from Dictionary:
The above code mutates the existing dictionary but if you want to return a new dictionary, make a copy of the dictionary using the following code:
def removekey(d, key):
r = dict(d)
If you want to learn handling dictionaries then check out this Python Tutorial by Intellipaat.