f1 = ['e'] # >10% f2 = ['a', 'i', 'r', 't', 'o', 'n'] f3 = ['s', 'l', 'c'] f4 = ['u', 'p', 'm', 'd', 'h'] f5 = ['g', 'b', 'y', 'f', 'v'] f6 = ['w', 'k', 'x', 'z', 'q', 'j'] # <1% mf = [f1, f2, f3, f4, f5, f6] mp = [[iter(range(len(mf[i]))) for j in range(len(mf[i]))] for i in range(len(mf))] for i in range(len(mf)): for j in range(len(mf[i])): mp[i].append(None) flag = True while(flag): key = {} for i in range(len(mf)): mp[i] = itertools.permutations(range(len(mf[i])))我这里得到的mp会是?
时间: 2023-12-24 12:03:13 浏览: 65
F1,F2,F3,F4,F7,H7,L0,L1,L4官方手册
根据代码可以看出,mp是一个二维列表,包含了6个子列表,每个子列表都是由若干个迭代器和None元素构成的。迭代器用来生成每个子列表中的排列。根据代码中的实现,mp的形状应该是一个6行12列的二维列表,其中前6列是迭代器,后6列是None元素。具体的mp列表如下所示:
```python
mp = [
[iter(range(len(f1))), None, None, None, None, None, None, None, None, None, None, None],
[iter(range(len(f2))), iter(range(len(f2))), iter(range(len(f2))), iter(range(len(f2))), iter(range(len(f2))), iter(range(len(f2))), None, None, None, None, None, None],
[iter(range(len(f3))), iter(range(len(f3))), iter(range(len(f3))), None, None, None, None, None, None, None, None, None],
[iter(range(len(f4))), iter(range(len(f4))), iter(range(len(f4))), iter(range(len(f4))), iter(range(len(f4))), None, None, None, None, None, None, None],
[iter(range(len(f5))), iter(range(len(f5))), iter(range(len(f5))), iter(range(len(f5))), iter(range(len(f5))), None, None, None, None, None, None, None],
[iter(range(len(f6))), iter(range(len(f6))), iter(range(len(f6))), iter(range(len(f6))), iter(range(len(f6))), iter(range(len(f6))), None, None, None, None, None, None]
]
```
阅读全文