Can dictionary have a duplicate keys ?
Answer / Rajeev Ranjan Jha
No, in Python dictionaries cannot have duplicate keys. If you try to add a key that already exists, the last value overwrites the previous one.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the types of variables in python?
How will you merge two dictionaries in python?
How does python sort work?
Does python supports interfaces like in java or c#?
What is raw_input in python 3?
What is the difference between a shallow copy and deep copy?
Is geany a good ide?
Is python scripting easy to learn?
What are the different ways to create an empty numpy array in python?
How to get a random number in python?
What is flatmap in python?
Should I learn python or scala?