I have following python dictionary.
a={'name':'test','age':'26','place':'world','name':'test1'}
How to grep only duplicate key:value pair from the above?
Output should be:
"name: test and name:test1"
I have following python dictionary.
a={'name':'test','age':'26','place':'world','name':'test1'}
How to grep only duplicate key:value pair from the above?
Output should be:
"name: test and name:test1"
python dictionaries's key can't repeat, so 'name':test, 'name':test1 can just keep one. the other will be override.