Answers for "remove that key value pair"

3

delete a key value pair from a dictionary in python

mydict = {'score1': 41, 'score2': 23, 'score3': 45}

del mydict['score2']
print(mydict)
{'score1': 41, 'score3': 45}
Posted by: Guest on May-14-2020
0

Which of the following method is used to remove all key/value pair map?

Which of the following method is used to remove all key/value pair map?
Posted by: Guest on June-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language