获取两个序列每个元素两两组合的结果。
>>> list1 = ['a', 'b']
>>> list2 = ['1', '2']
>>> [(m, n) for m in list1 for n in list2]
[('a', '1'), ('a', '2'), ('b', '1'), ('b', '2')]
>>> from itertools import product
>>> list(product(list1, list2))
[('a', '1'), ('a', '2'), ('b', '1'), ('b', '2')]