In this example we will show how to remove the item with the specified key name using the pop() method in Python.
Source Code
mydict = {
'name': 'Steven',
'age': 24,
'ID': 123456
}
mydict.pop('age')
print(mydict)
Output:
{'name': 'Steven', 'ID': 123456}