Q.

Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?

A. d.delete(“john”:40)
B. d.delete(“john”)
C. del d[“john”]
D. del d(“john”:40)
Answer» C. del d[“john”]
Explanation: execute in the shell to verify.
2.7k
0
Do you find this helpful?
21

Discussion

No comments yet