0
remove duplicate values in python dictionaries
...
5 Answers
+ 2
Dheeraj.D, removing anything is different to removing duplicates.
You can erase single items with del. In relation to my example above, let's say, the name of the dict is 'd', for example:
del d['dog']
If you want to empty the whole dict, use:
d.clear()
+ 6
Can you show us your code / try or what you have done so far this task?
+ 4
You can only have duplicate values in a dict, if the same value is stored under different keys.
{'cat': 'chat', 'dog': 'chat'}
On which basis do you decide which key to keep?
+ 2
Thanks bro
0
HonFu remove anything