Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which method/keyword is used to remove a key - value pair from a dictio…

Question

which method/keyword is used to remove a key - value pair from a dictionary?
o remove()
o delete()
o pop()
o del

Explanation:

Brief Explanations

In Python, the del keyword is used to remove a key - value pair from a dictionary. The pop() method also removes a key - value pair but returns the value. The remove() method is for lists (removes the first occurrence of a value). The delete() is not a standard method for dictionaries in Python.

Answer:

del