1.

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» Right choice is (c) del d[“john”]

Easy explanation - Execute in the shell to verify.


Discussion

No Comment Found