Write a Python function to Remove the Given Key from a Dictionary
Topic: Write a Python function to Remove the Given Key from a Dictionary
Solution
def deletekey(dict,key) if key in dict: del dict[key] return dict
List all Python Programs
Solution
def deletekey(dict,key) if key in dict: del dict[key] return dict