朋友们,基本上,我想听听:
fruit_dict = {'oranges':['big','small'],'apples':['green','yellow','red']}
并通过在不同键的所有值之间进行所有可能的排列来获得以下字典列表:
output_list =
[
{'oranges':'big','apples':'green'},
{'oranges':'big','apples':'yellow'},
{'oranges':'big','apples':'red'},
{'oranges':'small','apples':'green'},
{'oranges':'small','apples':'yellow'},
{'oranges':'small','apples':'red'}
]
怎么做?太感谢了!