【发布时间】:2018-03-28 02:11:25
【问题描述】:
我不知道我给出的标题是否能很好地解释我需要我的程序做什么。我将有以下形式的字典:
main_dictionary = {1: [ [a], [b], [c], ... ], 2: [ [a], [b], [c], ... ] , ... }
字典可以任意长,并且每个键有任意数量的选项。然后我需要程序对这本字典的每一个排列进行测试。
sub_dictionary = {1: [a], 2: [a], ... }
test_program(sub_dictionary)
sub_dictionary = {1: [a], 2: [b], ... }
test_program(sub_dictionary)
【问题讨论】:
标签: python python-2.7 dictionary permutation