list1 = ['A', 'B']
list2 = [[(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4)]]
我需要我的输出:
[[(1, 1), (1, 2), (1, 3), (1, 4)],[(2, 1), (2, 2), (2, 3), (2, 4)]]
现在如果我知道:
- 子列表 1 的长度 = 4
- sublist2 的长度 = 4
那么我怎样才能将所有这些放入字典中,例如:
{'A':length of sublist1, 'B':length of sublist2}