У меня есть несколько словарей в переменной под названием stats
print (stats)
{'CAT1': [{'Fruit': 'Apple', 'Sound': 'Meow', 'Sleep': 'Normal', 'Color': 'blue', 'Eye': 'blue', 'Tail': 'Short'}]}
{'CAT2': [{'Fruit': 'Orange', 'Sound': 'Meow', 'Sleep': 'Less', 'Color': 'orange', 'Eye': 'black', 'Tail': 'long'}]}
{'CAT3': [{'Fruit': 'Mango', 'Sound': 'Meow', 'Sleep': 'Abnormal', 'Color': 'blue', 'Eye': 'black', 'Tail': 'Short'}]}
{'CAT4': [{'Fruit': 'Peach', 'Sound': 'Meow', 'Sleep': 'Normal', 'Color': 'yellow', 'Eye': 'black', 'Tail': 'short'}]}
и у меня есть другой владелец словаря
print(Owner)
{'CAT1': ['this cat belongs to YZMIKE'], 'CAT2': ['this cat belongs to AAJOHN'], 'CAT3': ['this cat belongs to FPROB'], 'CAT4': ['this cat belongs to LDKATE']}
Я хочу выполнить поиск на основе KEY в обоих словарях, чтобы вывод был ниже
{
'this cat belongs to YZMIKE':[{'Fruit': 'Apple', 'Sound': 'Meow', 'Sleep': 'Normal', 'Color': 'blue', 'Eye': 'blue', 'Tail': 'Short'}]
'this cat belongs to AAJOHN':[{'Fruit': 'Orange', 'Sound': 'Meow', 'Sleep': 'Less', 'Color': 'orange', 'Eye': 'black', 'Tail': 'long'}]
'this cat belongs to FPROB':[{'Fruit': 'Mango', 'Sound': 'Meow', 'Sleep': 'Abnormal', 'Color': 'blue', 'Eye': 'black', 'Tail': 'Short'}]
'this cat belongs to LDKATE':[{'Fruit': 'Peach', 'Sound': 'Meow', 'Sleep': 'Normal', 'Color': 'yellow', 'Eye': 'black', 'Tail': 'short'}]
}
Оцените вашу помощь ... Я новичок в python и не уверен, как я могу выполнить этот поиск ..