def paths(some_dict, path=()):
    for key, value in some_dict.items():
        key_path = path + (key,)
        yield key_path
        if hasattr(value, 'items'):
            yield from paths(value, key_path)

d = {'a': {'b': {'c': {},'d': {'e': {}}}}}
print(*paths(d), sep='\n')
