Question:

Duplicate keys are NOT ALLOWED in Dictionaries.

Show Hint

In Python dictionaries, keys must always be unique, but values can be duplicated.
Updated On: Mar 14, 2026
  • True
  • False
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understand what a dictionary is in Python.
A dictionary in Python is a collection of key–value pairs. Each key in the dictionary is associated with a specific value. The general format of a dictionary is \[ \{key:value\} \] Example \[ \{name:"John", age:20\} \] Step 2: Understand the rule of dictionary keys.
In Python, keys in a dictionary must be unique. This means that two identical keys cannot exist in the same dictionary.
If duplicate keys are used, Python automatically keeps the last value and overwrites the previous value.
Step 3: Interpret the statement given.
The statement says that duplicate keys are not allowed in dictionaries. Since dictionary keys must always be unique, this statement is correct.
Step 4: Conclusion.
Therefore the correct answer is True.
Was this answer helpful?
0
0