How to avoid Multi-layer Loop nesting in python

Hello, everyone. I recently wrote a script because a lot of the information in the middle is stored in multiple dictionaries and there are nested dictionaries. As a result, when I take relevant information later, I have to use multiple for nesting, which leads to poor readability of the code, so I would like to ask you how to avoid multiple loop nesting. For example,

for key, values in XXX.items():
    for apple, banana in values.items():
        for cats, dogs in YYY.items():
            ...
Mar.11,2021
Menu