πŸ“Š Python
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

πŸ‘οΈ
32
Total Visits
πŸ“½οΈ
7 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate