Q. What happens when two keys in a dictionary are the same?

  • (A) An error occurs
  • (B) The first key is retained
  • (C) The last key overwrites the previous one
  • (D) Both keys are stored
πŸ’¬ Discuss
βœ… Correct Answer: (C) The last key overwrites the previous one
Explanation: In a dictionary, duplicate keys are not allowed. The last assignment overwrites the previous one.
Explanation by: Mr. Dubey
In a dictionary, duplicate keys are not allowed. The last assignment overwrites the previous one.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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