delete a key value pair from a dictionary in python

Solutions on MaxInterview for delete a key value pair from a dictionary in python by the best coders in the world

showing results for - "delete a key value pair from a dictionary in python"
Finn
12 Mar 2016
1mydict = {'score1': 41, 'score2': 23, 'score3': 45}
2
3del mydict['score2']
4print(mydict)
5{'score1': 41, 'score3': 45}