Suppose a dictionary is:
sd = {'q':1,'w':2,'e':4}
i know we can delete a pair though deleting respective key? but can we just delete a value? i got this question in a interview thats why i asked here.
Suppose a dictionary is:
sd = {'q':1,'w':2,'e':4}
i know we can delete a pair though deleting respective key? but can we just delete a value? i got this question in a interview thats why i asked here.
In short, No. You can't delete a value in a key-value pair but you can set the value to be None.