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)
πŸ’¬ Discuss
βœ… Correct Answer: (C) del d[“john”]
Explanation: execute in the shell to verify.

Explanation by: Mr. Dubey
execute in the shell to verify.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
503
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate