I have this dictionary and I don’t want to print (the key and the value) if they already exist (as value and key) or vice versa.
I want to print (orange and apple) and (Strawberry and Grapes) for once.
{
'Orange' : ‘Apple’,
‘Orange' : ‘Banana’,
’Strawberry': ‘Grapes’,
‘Apple' : ‘Orange’,
‘Blackberry': ‘Banana’,
’Cherry' : ‘Fig’,
’Grapes' : ‘Strawberry’
}
Expexted output:
Orange Apple
Orange Banana
Strawberry Grapes
BlackBerry Banana
Cherry Fig