Q. How do you copy a dictionary?

  • (A) copy = dict
  • (B) copy = dict.clone()
  • (C) copy = dict.copy()
  • (D) copy = dict.duplicate()
πŸ’¬ Discuss
βœ… Correct Answer: (C) copy = dict.copy()
Explanation: `copy()` creates a shallow copy of the dictionary.
Explanation by: Mr. Dubey
`copy()` creates a shallow copy of the dictionary.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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