Q. How is del D and del D[<key>] different from one another if D is a dictionary?
Answer =
Del D delete the all dictionary or delete the value of D . So that when we want to find the value of D then it will give error that D is not defined.
While del D[<key>] delete the particular key which is given by user.
Thankyou
ReplyDeleteWelcome : )
DeleteIt is correct thanks
ReplyDeleteWelcome : )
DeleteIf we give del D[]
DeleteWon't the particular key-value pair will be deleted?.
I'm saying because they said particular key only will delete.
I meant del [ ] of key
Deletethank you
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )