我的字典结构长这样:
mapping = {'outputs': {'cube1': {'tx': 1.0}}}
我正在这样迭代它们:
for node, props in mapping['outputs'].items():
for prop, value in props.items():
#Further loops
有没有一种优雅的方法将这两个嵌套循环合并成一个循环?
我想要得到这样的结果:
for node, prop, value in nest_loop(mapping['outputs']):
#Further loops