Computer Science, asked by kartavyaking1212, 4 days ago

How is the clear( ) function different from del in Python?​

Answers

Answered by Bajpai3663
2

Answer:

Clear () function delete the all keys and values in the dictionary and leave the dictionary empty. While del <dict> delete the complete dictionary when we want to find deleted dictionary then it will give error that <dict> not defined.

Answered by aryanprasadblr
1

Answer:

the python clear() function removes all the items from the dictionary not the dictionary but in del the whole dictionary is deleted

Similar questions